summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/CppunitTest_sw_core_fields.mk76
-rw-r--r--sw/CppunitTest_sw_core_text.mk1
-rw-r--r--sw/CppunitTest_sw_core_tox.mk76
-rw-r--r--sw/CppunitTest_sw_odfexport2.mk72
-rw-r--r--sw/CppunitTest_sw_odfimport.mk2
-rw-r--r--sw/CppunitTest_sw_ooxmlexport5.mk4
-rw-r--r--sw/CppunitTest_sw_ooxmlimport2.mk5
-rw-r--r--sw/CppunitTest_sw_ww8export.mk1
-rw-r--r--sw/CppunitTest_sw_ww8export2.mk9
-rw-r--r--sw/CppunitTest_sw_ww8export3.mk11
-rw-r--r--sw/Library_sw.mk3
-rw-r--r--sw/Module_sw.mk3
-rw-r--r--sw/README211
-rw-r--r--sw/README.md211
-rw-r--r--sw/UIConfig_swriter.mk6
-rw-r--r--sw/inc/AnnotationWin.hxx48
-rw-r--r--sw/inc/BorderCacheOwner.hxx49
-rw-r--r--sw/inc/EnhancedPDFExportHelper.hxx4
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx8
-rw-r--r--sw/inc/IDocumentSettingAccess.hxx1
-rw-r--r--sw/inc/SwSmartTagMgr.hxx3
-rw-r--r--sw/inc/ToxLinkProcessor.hxx2
-rw-r--r--sw/inc/ToxTextGenerator.hxx5
-rw-r--r--sw/inc/anchoreddrawobject.hxx1
-rw-r--r--sw/inc/anchoredobject.hxx2
-rw-r--r--sw/inc/authfld.hxx17
-rw-r--r--sw/inc/calbck.hxx12
-rw-r--r--sw/inc/cmdid.h5
-rw-r--r--sw/inc/crsrsh.hxx2
-rw-r--r--sw/inc/dcontact.hxx17
-rw-r--r--sw/inc/doc.hxx9
-rw-r--r--sw/inc/docstyle.hxx4
-rw-r--r--sw/inc/dpage.hxx2
-rw-r--r--sw/inc/drawdoc.hxx2
-rw-r--r--sw/inc/editsh.hxx1
-rw-r--r--sw/inc/fesh.hxx3
-rw-r--r--sw/inc/fldbas.hxx2
-rw-r--r--sw/inc/fmtcol.hxx24
-rw-r--r--sw/inc/format.hxx29
-rw-r--r--sw/inc/hintids.hxx140
-rw-r--r--sw/inc/hints.hxx4
-rw-r--r--sw/inc/inspectorproperties.hrc3
-rw-r--r--sw/inc/ndole.hxx2
-rw-r--r--sw/inc/ndtxt.hxx11
-rw-r--r--sw/inc/node.hxx3
-rw-r--r--sw/inc/numrule.hxx4
-rw-r--r--sw/inc/pagedesc.hxx23
-rw-r--r--sw/inc/pch/precompiled_msword.hxx20
-rw-r--r--sw/inc/pch/precompiled_sw.hxx13
-rw-r--r--sw/inc/pch/precompiled_swui.hxx18
-rw-r--r--sw/inc/pch/precompiled_vbaswobj.hxx17
-rw-r--r--sw/inc/poolfmt.hxx5
-rw-r--r--sw/inc/postithelper.hxx2
-rw-r--r--sw/inc/strings.hrc52
-rw-r--r--sw/inc/swabstdlg.hxx4
-rw-r--r--sw/inc/swevent.hxx4
-rw-r--r--sw/inc/swtypes.hxx4
-rw-r--r--sw/inc/textboxhelper.hxx42
-rw-r--r--sw/inc/tox.hxx26
-rw-r--r--sw/inc/toxwrap.hxx6
-rw-r--r--sw/inc/txatbase.hxx6
-rw-r--r--sw/inc/txtftn.hxx1
-rw-r--r--sw/inc/unocrsrhelper.hxx7
-rw-r--r--sw/inc/unodraw.hxx3
-rw-r--r--sw/inc/unoparagraph.hxx2
-rw-r--r--sw/inc/unoprnms.hxx1
-rw-r--r--sw/inc/unotbl.hxx2
-rw-r--r--sw/inc/unotextbodyhf.hxx2
-rw-r--r--sw/inc/unotextrange.hxx2
-rw-r--r--sw/inc/unotxdoc.hxx13
-rw-r--r--sw/inc/utlui.hrc3
-rw-r--r--sw/inc/view.hxx26
-rw-r--r--sw/inc/viewopt.hxx3
-rw-r--r--sw/ooxmlexport_setup.mk9
-rw-r--r--sw/qa/api/SwXDocumentSettings.cxx2
-rw-r--r--sw/qa/api/SwXTextField.cxx1
-rw-r--r--sw/qa/api/SwXTextTable.cxx1
-rw-r--r--sw/qa/api/terminate.cxx1
-rw-r--r--sw/qa/core/Test-BigPtrArray.cxx18
-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.cxx52
-rw-r--r--sw/qa/core/fields/fields.cxx69
-rw-r--r--sw/qa/core/frmedt/frmedt.cxx2
-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/data/vmerge-cell-border.docxbin0 -> 13610 bytes
-rw-r--r--sw/qa/core/layout/layout.cxx251
-rw-r--r--sw/qa/core/macros-test.cxx7
-rw-r--r--sw/qa/core/objectpositioning/data/inside-outside-vert-align.docxbin15838 -> 17252 bytes
-rw-r--r--sw/qa/core/objectpositioning/objectpositioning.cxx50
-rw-r--r--sw/qa/core/test_ToxLinkProcessor.cxx18
-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.cxx256
-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.cxx172
-rw-r--r--sw/qa/extras/globalfilter/globalfilter.cxx2
-rw-r--r--sw/qa/extras/htmlexport/data/ole1-pres-data-wmf.odtbin0 -> 41595 bytes
-rw-r--r--sw/qa/extras/htmlexport/data/reqif-aschar-objsize.odtbin0 -> 70411 bytes
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx230
-rw-r--r--sw/qa/extras/htmlexport/xhtmlexport.cxx2
-rw-r--r--sw/qa/extras/layout/data/tdf116486.docxbin22455 -> 22470 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf138465min.docxbin0 -> 19431 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf138951.odtbin0 -> 9894 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf141079.odtbin0 -> 8787 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf40260.odtbin0 -> 17192 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf72727.odtbin0 -> 13943 bytes
-rw-r--r--sw/qa/extras/layout/layout2.cxx171
-rw-r--r--sw/qa/extras/mailmerge/mailmerge.cxx3
-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.odtbin0 -> 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/tdf115815.odtbin0 -> 9809 bytes
-rw-r--r--sw/qa/extras/odfexport/data/tdf140437.odtbin0 -> 8641 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.cxx388
-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/CommentDone.docxbin0 -> 20946 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/controlshape.fodt182
-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/footer-margin-lost.docxbin0 -> 21058 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/gutter-left.docxbin0 -> 11860 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/gutter-top.docxbin0 -> 13032 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/rtl-gutter.docxbin0 -> 8843 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/shape-atpage-in-table.fodt185
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118535.odtbin0 -> 12032 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docxbin0 -> 20235 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124678_no_leading_paragraph.odtbin0 -> 9122 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf124678_with_leading_paragraph.odtbin0 -> 9164 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/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/tdf133473.docxbin0 -> 83030 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134619_numberingProps.docbin0 -> 75264 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf134951_duplicates.odtbin0 -> 59225 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135774_numberingCRProps.docxbin0 -> 9989 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135774_numberingShading.docxbin0 -> 5435 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136059.odtbin0 -> 17964 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf136841.docxbin0 -> 15697 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137655.docxbin0 -> 33098 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138345_numberingHighlight.docxbin0 -> 5752 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138771.docxbin0 -> 26757 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf138780.odtbin0 -> 9383 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140137.docxbin0 -> 28792 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docxbin0 -> 34729 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140336_paraNoneShading.odtbin0 -> 10529 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140572_docDefault_superscript.docxbin0 -> 16387 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140597.docxbin0 -> 13966 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf140668.docxbin0 -> 14629 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141172.docxbin0 -> 16286 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141173_missingFrames.rtf61
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141231_arabicHebrewNumbering.docxbin0 -> 20367 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141548.docxbin0 -> 4675 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141550.docxbin0 -> 18735 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf141660.docxbin0 -> 35150 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf88126.docxbin40642 -> 0 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/textframe-gradient.docxbin10916 -> 13655 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx16
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx15
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx40
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport12.cxx35
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx27
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx81
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport15.cxx29
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport16.cxx327
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx31
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx10
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx17
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport6.cxx22
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport7.cxx9
-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/data/tdf74367_MarginsZeroed.docxbin0 -> 12600 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx53
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport2.cxx61
-rw-r--r--sw/qa/extras/rtfexport/data/gutter-left.rtf4
-rw-r--r--sw/qa/extras/rtfexport/data/gutter-top.rtf4
-rw-r--r--sw/qa/extras/rtfexport/data/rtl-gutter.rtf4
-rw-r--r--sw/qa/extras/rtfexport/data/tdf100961_fixedDateTime.rtf38
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx32
-rw-r--r--sw/qa/extras/rtfexport/rtfexport3.cxx82
-rw-r--r--sw/qa/extras/rtfexport/rtfexport4.cxx29
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx18
-rw-r--r--sw/qa/extras/tiledrendering/data/cond-coll-copy.odtbin0 -> 7351 bytes
-rw-r--r--sw/qa/extras/tiledrendering/data/tdf114799_highlight.docxbin0 -> 29040 bytes
-rw-r--r--sw/qa/extras/tiledrendering/data/tdf114799_shd.docx (renamed from sw/qa/extras/tiledrendering/data/tdf114799.docx)bin29049 -> 29049 bytes
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx205
-rw-r--r--sw/qa/extras/uiwriter/data/AsCharTxBxTest.docxbin0 -> 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/uitest/data/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.docxbin0 -> 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/tdf140975.docxbin0 -> 5124 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.odtbin0 -> 11068 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx101
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx193
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx520
-rw-r--r--sw/qa/extras/unowriter/data/tdf134252_onlytable_protected.fodt87
-rw-r--r--sw/qa/extras/unowriter/unowriter.cxx73
-rw-r--r--sw/qa/extras/ww8export/data/gutter-left.docbin0 -> 22528 bytes
-rw-r--r--sw/qa/extras/ww8export/data/gutter-top.docbin0 -> 22528 bytes
-rw-r--r--sw/qa/extras/ww8export/data/rtl-gutter.docbin0 -> 22528 bytes
-rw-r--r--sw/qa/extras/ww8export/data/tdf100961_fixedDateTime.docbin0 -> 19968 bytes
-rw-r--r--sw/qa/extras/ww8export/data/tdf120003.docbin0 -> 10752 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.cxx33
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx77
-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.py12
-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/dochdl/dochdl.cxx30
-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/chapterNumbering/tdf140528.py60
-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/bookmark-metadata.odtbin0 -> 9521 bytes
-rw-r--r--sw/qa/uitest/data/metadata.odtbin0 -> 10066 bytes
-rw-r--r--sw/qa/uitest/data/tdf104795.odtbin0 -> 10947 bytes
-rw-r--r--sw/qa/uitest/data/tdf122780.docxbin0 -> 93731 bytes
-rw-r--r--sw/qa/uitest/data/tdf127166_prstDash_Word97.docxbin0 -> 6300 bytes
-rw-r--r--sw/qa/uitest/data/tdf137803.odtbin0 -> 9416 bytes
-rw-r--r--sw/qa/uitest/data/tdf138271.odtbin0 -> 8763 bytes
-rw-r--r--sw/qa/uitest/data/tdf140117.fodt95
-rw-r--r--sw/qa/uitest/data/tdf140198.odtbin0 -> 8667 bytes
-rw-r--r--sw/qa/uitest/data/tdf140239.odtbin0 -> 9021 bytes
-rw-r--r--sw/qa/uitest/data/tdf140486.odtbin0 -> 8783 bytes
-rw-r--r--sw/qa/uitest/data/tdf140661.odtbin0 -> 13854 bytes
-rw-r--r--sw/qa/uitest/data/tdf141557.docxbin0 -> 5394 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/data/tdf49683.rtf81
-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/macro_tests/tdf124413.py2
-rw-r--r--sw/qa/uitest/macro_tests/tdf64690.py79
-rw-r--r--sw/qa/uitest/navigator/tdf114724.py30
-rw-r--r--sw/qa/uitest/navigator/tdf137274.py8
-rw-r--r--sw/qa/uitest/navigator/tdf140257.py115
-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.py81
-rw-r--r--sw/qa/uitest/sidebar/tdf99711.py8
-rw-r--r--sw/qa/uitest/styleInspector/styleInspector.py133
-rw-r--r--sw/qa/uitest/styleInspector/tdf137513.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.py29
-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.py14
-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.py18
-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/documentProperties.py28
-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/spellDialog.py3
-rw-r--r--sw/qa/uitest/writer_tests4/start.py2
-rw-r--r--sw/qa/uitest/writer_tests4/tdf108124.py42
-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.py9
-rw-r--r--sw/qa/uitest/writer_tests4/tdf135636.py6
-rw-r--r--sw/qa/uitest/writer_tests4/tdf136578.py10
-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.py5
-rw-r--r--sw/qa/uitest/writer_tests5/tdf121591.py41
-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/tdf123446.py5
-rw-r--r--sw/qa/uitest/writer_tests5/titlePage.py5
-rw-r--r--sw/qa/uitest/writer_tests5/titlePageWizard.py81
-rw-r--r--sw/qa/uitest/writer_tests5/titlePageWizard2.py136
-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.py214
-rw-r--r--sw/qa/uitest/writer_tests7/tdf104795.py (renamed from sw/qa/uitest/writer_tests4/tdf49683.py)19
-rw-r--r--sw/qa/uitest/writer_tests7/tdf115853.py44
-rw-r--r--sw/qa/uitest/writer_tests7/tdf119661.py93
-rw-r--r--sw/qa/uitest/writer_tests7/tdf122780.py28
-rw-r--r--sw/qa/uitest/writer_tests7/tdf130629.py43
-rw-r--r--sw/qa/uitest/writer_tests7/tdf131936.py1
-rw-r--r--sw/qa/uitest/writer_tests7/tdf132169.py7
-rw-r--r--sw/qa/uitest/writer_tests7/tdf137802.py6
-rw-r--r--sw/qa/uitest/writer_tests7/tdf137803.py52
-rw-r--r--sw/qa/uitest/writer_tests7/tdf139301.py42
-rw-r--r--sw/qa/uitest/writer_tests7/tdf140117.py63
-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/tdf141557.py40
-rw-r--r--sw/qa/uitest/writer_tests7/tdf46561.py100
-rw-r--r--sw/qa/unit/swmodeltestbase.cxx79
-rw-r--r--sw/sdi/_listsh.sdi7
-rw-r--r--sw/sdi/_textsh.sdi8
-rw-r--r--sw/sdi/_viewsh.sdi9
-rw-r--r--sw/sdi/annotsh.sdi2
-rw-r--r--sw/sdi/drawsh.sdi5
-rw-r--r--sw/sdi/drwtxtsh.sdi2
-rw-r--r--sw/sdi/swriter.sdi18
-rw-r--r--sw/source/core/access/AccessibilityCheck.cxx29
-rw-r--r--sw/source/core/access/acccontext.cxx15
-rw-r--r--sw/source/core/access/accdoc.cxx4
-rw-r--r--sw/source/core/access/accdoc.hxx1
-rw-r--r--sw/source/core/access/accframebase.cxx3
-rw-r--r--sw/source/core/access/acchyperlink.cxx2
-rw-r--r--sw/source/core/access/accmap.cxx61
-rw-r--r--sw/source/core/access/accnotexthyperlink.cxx2
-rw-r--r--sw/source/core/access/accpara.cxx36
-rw-r--r--sw/source/core/access/accpara.hxx2
-rw-r--r--sw/source/core/access/accportions.cxx2
-rw-r--r--sw/source/core/access/acctable.cxx5
-rw-r--r--sw/source/core/access/acctextframe.cxx2
-rw-r--r--sw/source/core/attr/BorderCacheOwner.cxx45
-rw-r--r--sw/source/core/attr/calbck.cxx43
-rw-r--r--sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx10
-rw-r--r--sw/source/core/attr/format.cxx89
-rw-r--r--sw/source/core/attr/swatrset.cxx43
-rw-r--r--sw/source/core/bastyp/SwSmartTagMgr.cxx2
-rw-r--r--sw/source/core/bastyp/calc.cxx22
-rw-r--r--sw/source/core/bastyp/init.cxx8
-rw-r--r--sw/source/core/bastyp/swcache.cxx2
-rw-r--r--sw/source/core/bastyp/swrect.cxx12
-rw-r--r--sw/source/core/crsr/DateFormFieldButton.cxx116
-rw-r--r--sw/source/core/crsr/DropDownFormFieldButton.cxx163
-rw-r--r--sw/source/core/crsr/FormFieldButton.cxx37
-rw-r--r--sw/source/core/crsr/bookmrk.cxx138
-rw-r--r--sw/source/core/crsr/crsrsh.cxx18
-rw-r--r--sw/source/core/crsr/crstrvl.cxx34
-rw-r--r--sw/source/core/crsr/findattr.cxx14
-rw-r--r--sw/source/core/crsr/findtxt.cxx1
-rw-r--r--sw/source/core/crsr/pam.cxx30
-rw-r--r--sw/source/core/crsr/viscrs.cxx1
-rw-r--r--sw/source/core/doc/CntntIdxStore.cxx12
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx73
-rw-r--r--sw/source/core/doc/DocumentDrawModelManager.cxx7
-rw-r--r--sw/source/core/doc/DocumentLayoutManager.cxx1
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx10
-rw-r--r--sw/source/core/doc/DocumentSettingManager.cxx354
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx49
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx1
-rw-r--r--sw/source/core/doc/docbasic.cxx4
-rw-r--r--sw/source/core/doc/docbm.cxx97
-rw-r--r--sw/source/core/doc/docdesc.cxx125
-rw-r--r--sw/source/core/doc/docdraw.cxx3
-rw-r--r--sw/source/core/doc/docfld.cxx22
-rw-r--r--sw/source/core/doc/docfly.cxx44
-rw-r--r--sw/source/core/doc/docfmt.cxx77
-rw-r--r--sw/source/core/doc/doclay.cxx24
-rw-r--r--sw/source/core/doc/docnew.cxx14
-rw-r--r--sw/source/core/doc/docredln.cxx81
-rw-r--r--sw/source/core/doc/doctxm.cxx10
-rw-r--r--sw/source/core/doc/fmtcol.cxx33
-rw-r--r--sw/source/core/doc/notxtfrm.cxx66
-rw-r--r--sw/source/core/doc/number.cxx31
-rw-r--r--sw/source/core/doc/tblrwcl.cxx1
-rw-r--r--sw/source/core/doc/textboxhelper.cxx363
-rw-r--r--sw/source/core/docnode/ndsect.cxx26
-rw-r--r--sw/source/core/docnode/ndtbl.cxx23
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx1
-rw-r--r--sw/source/core/docnode/node.cxx100
-rw-r--r--sw/source/core/docnode/nodes.cxx17
-rw-r--r--sw/source/core/docnode/section.cxx24
-rw-r--r--sw/source/core/draw/dcontact.cxx124
-rw-r--r--sw/source/core/draw/dflyobj.cxx48
-rw-r--r--sw/source/core/draw/dobjfac.cxx1
-rw-r--r--sw/source/core/draw/dpage.cxx5
-rw-r--r--sw/source/core/draw/drawdoc.cxx5
-rw-r--r--sw/source/core/draw/dview.cxx6
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/edit/edfcol.cxx11
-rw-r--r--sw/source/core/edit/edfld.cxx6
-rw-r--r--sw/source/core/edit/ednumber.cxx28
-rw-r--r--sw/source/core/fields/authfld.cxx122
-rw-r--r--sw/source/core/fields/cellfml.cxx4
-rw-r--r--sw/source/core/fields/docufld.cxx14
-rw-r--r--sw/source/core/fields/fldbas.cxx37
-rw-r--r--sw/source/core/fields/postithelper.cxx17
-rw-r--r--sw/source/core/fields/usrfld.cxx16
-rw-r--r--sw/source/core/frmedt/fecopy.cxx21
-rw-r--r--sw/source/core/frmedt/fedesc.cxx1
-rw-r--r--sw/source/core/frmedt/fefly1.cxx1
-rw-r--r--sw/source/core/frmedt/feflyole.cxx6
-rw-r--r--sw/source/core/frmedt/feshview.cxx20
-rw-r--r--sw/source/core/frmedt/fetab.cxx4
-rw-r--r--sw/source/core/frmedt/fews.cxx6
-rw-r--r--sw/source/core/graphic/grfatr.cxx7
-rw-r--r--sw/source/core/inc/DateFormFieldButton.hxx15
-rw-r--r--sw/source/core/inc/DocumentChartDataProviderManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentDeviceManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentDrawModelManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentExternalDataManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentFieldsManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentLayoutManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentLinksAdministrationManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentListItemsManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentListsManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentOutlineNodesManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentSettingManager.hxx4
-rw-r--r--sw/source/core/inc/DocumentStateManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentStatisticsManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentStylePoolManager.hxx2
-rw-r--r--sw/source/core/inc/DocumentTimerManager.hxx2
-rw-r--r--sw/source/core/inc/DropDownFormFieldButton.hxx16
-rw-r--r--sw/source/core/inc/FormFieldButton.hxx10
-rw-r--r--sw/source/core/inc/GetMetricVal.hxx42
-rw-r--r--sw/source/core/inc/MarkManager.hxx12
-rw-r--r--sw/source/core/inc/SwGrammarMarkUp.hxx2
-rw-r--r--sw/source/core/inc/SwXMLBlockExport.hxx2
-rw-r--r--sw/source/core/inc/SwXMLBlockImport.hxx11
-rw-r--r--sw/source/core/inc/SwXTextDefaults.hxx2
-rw-r--r--sw/source/core/inc/UndoTable.hxx3
-rw-r--r--sw/source/core/inc/acorrect.hxx2
-rw-r--r--sw/source/core/inc/annotationmark.hxx2
-rw-r--r--sw/source/core/inc/ascharanchoredobjectposition.hxx2
-rw-r--r--sw/source/core/inc/attrhint.hxx2
-rw-r--r--sw/source/core/inc/bookmrk.hxx7
-rw-r--r--sw/source/core/inc/cellfrm.hxx6
-rw-r--r--sw/source/core/inc/colfrm.hxx2
-rw-r--r--sw/source/core/inc/crossrefbookmark.hxx4
-rw-r--r--sw/source/core/inc/dflyobj.hxx8
-rw-r--r--sw/source/core/inc/docfld.hxx6
-rw-r--r--sw/source/core/inc/docsort.hxx4
-rw-r--r--sw/source/core/inc/fieldhint.hxx2
-rw-r--r--sw/source/core/inc/flyfrm.hxx3
-rw-r--r--sw/source/core/inc/flyfrms.hxx1
-rw-r--r--sw/source/core/inc/fntcache.hxx27
-rw-r--r--sw/source/core/inc/frmtool.hxx6
-rw-r--r--sw/source/core/inc/ftnfrm.hxx2
-rw-r--r--sw/source/core/inc/hffrm.hxx4
-rw-r--r--sw/source/core/inc/layact.hxx25
-rw-r--r--sw/source/core/inc/mvsave.hxx2
-rw-r--r--sw/source/core/inc/notxtfrm.hxx3
-rw-r--r--sw/source/core/inc/pagedeschint.hxx2
-rw-r--r--sw/source/core/inc/retrieveinputstream.hxx6
-rw-r--r--sw/source/core/inc/rolbck.hxx34
-rw-r--r--sw/source/core/inc/swfntcch.hxx2
-rw-r--r--sw/source/core/inc/swfont.hxx2
-rw-r--r--sw/source/core/inc/textapi.hxx2
-rw-r--r--sw/source/core/inc/threadlistener.hxx2
-rw-r--r--sw/source/core/inc/tocntntanchoredobjectposition.hxx2
-rw-r--r--sw/source/core/inc/tolayoutanchoredobjectposition.hxx2
-rw-r--r--sw/source/core/inc/txmsrt.hxx24
-rw-r--r--sw/source/core/inc/txtfrm.hxx6
-rw-r--r--sw/source/core/inc/unobookmark.hxx2
-rw-r--r--sw/source/core/inc/unoevent.hxx13
-rw-r--r--sw/source/core/inc/unofield.hxx6
-rw-r--r--sw/source/core/inc/unoflatpara.hxx4
-rw-r--r--sw/source/core/inc/unoidx.hxx4
-rw-r--r--sw/source/core/inc/unometa.hxx2
-rw-r--r--sw/source/core/inc/unoparaframeenum.hxx4
-rw-r--r--sw/source/core/inc/unoport.hxx7
-rw-r--r--sw/source/core/inc/unorefmark.hxx2
-rw-r--r--sw/source/core/inc/unosection.hxx2
-rw-r--r--sw/source/core/inc/unotextmarkup.hxx2
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx15
-rw-r--r--sw/source/core/layout/anchoredobject.cxx1
-rw-r--r--sw/source/core/layout/atrfrm.cxx177
-rw-r--r--sw/source/core/layout/dumpfilter.cxx4
-rw-r--r--sw/source/core/layout/flowfrm.cxx1
-rw-r--r--sw/source/core/layout/fly.cxx39
-rw-r--r--sw/source/core/layout/flycnt.cxx45
-rw-r--r--sw/source/core/layout/flyincnt.cxx1
-rw-r--r--sw/source/core/layout/flylay.cxx1
-rw-r--r--sw/source/core/layout/frmtool.cxx71
-rw-r--r--sw/source/core/layout/layact.cxx111
-rw-r--r--sw/source/core/layout/laycache.cxx1
-rw-r--r--sw/source/core/layout/newfrm.cxx5
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx25
-rw-r--r--sw/source/core/layout/pagechg.cxx27
-rw-r--r--sw/source/core/layout/pagedesc.cxx203
-rw-r--r--sw/source/core/layout/paintfrm.cxx119
-rw-r--r--sw/source/core/layout/sectfrm.cxx26
-rw-r--r--sw/source/core/layout/sortedobjs.cxx1
-rw-r--r--sw/source/core/layout/ssfrm.cxx1
-rw-r--r--sw/source/core/layout/tabfrm.cxx119
-rw-r--r--sw/source/core/layout/trvlfrm.cxx1
-rw-r--r--sw/source/core/layout/wsfrm.cxx28
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx1
-rw-r--r--sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx1
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx1
-rw-r--r--sw/source/core/ole/ndole.cxx28
-rw-r--r--sw/source/core/para/paratr.cxx8
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx1
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx5
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx114
-rw-r--r--sw/source/core/text/atrstck.cxx156
-rw-r--r--sw/source/core/text/frmform.cxx12
-rw-r--r--sw/source/core/text/guess.cxx196
-rw-r--r--sw/source/core/text/guess.hxx36
-rw-r--r--sw/source/core/text/inftxt.cxx2
-rw-r--r--sw/source/core/text/itratr.cxx185
-rw-r--r--sw/source/core/text/itratr.hxx6
-rw-r--r--sw/source/core/text/itrcrsr.cxx16
-rw-r--r--sw/source/core/text/itrform2.cxx6
-rw-r--r--sw/source/core/text/itrform2.hxx6
-rw-r--r--sw/source/core/text/itrpaint.cxx6
-rw-r--r--sw/source/core/text/itrpaint.hxx8
-rw-r--r--sw/source/core/text/itrtxt.cxx4
-rw-r--r--sw/source/core/text/itrtxt.hxx6
-rw-r--r--sw/source/core/text/pordrop.hxx59
-rw-r--r--sw/source/core/text/porexp.cxx2
-rw-r--r--sw/source/core/text/porexp.hxx4
-rw-r--r--sw/source/core/text/porfld.cxx96
-rw-r--r--sw/source/core/text/porfld.hxx24
-rw-r--r--sw/source/core/text/porfly.cxx35
-rw-r--r--sw/source/core/text/porfly.hxx8
-rw-r--r--sw/source/core/text/porftn.hxx14
-rw-r--r--sw/source/core/text/porglue.cxx8
-rw-r--r--sw/source/core/text/porglue.hxx18
-rw-r--r--sw/source/core/text/porhyph.hxx17
-rw-r--r--sw/source/core/text/porlay.hxx5
-rw-r--r--sw/source/core/text/porlin.hxx7
-rw-r--r--sw/source/core/text/pormulti.cxx247
-rw-r--r--sw/source/core/text/pormulti.hxx41
-rw-r--r--sw/source/core/text/porref.cxx10
-rw-r--r--sw/source/core/text/porref.hxx7
-rw-r--r--sw/source/core/text/porrst.cxx88
-rw-r--r--sw/source/core/text/porrst.hxx31
-rw-r--r--sw/source/core/text/portab.hxx15
-rw-r--r--sw/source/core/text/portox.cxx10
-rw-r--r--sw/source/core/text/portox.hxx7
-rw-r--r--sw/source/core/text/portxt.hxx5
-rw-r--r--sw/source/core/text/possiz.hxx5
-rw-r--r--sw/source/core/text/redlnitr.cxx4
-rw-r--r--sw/source/core/text/txtcache.cxx3
-rw-r--r--sw/source/core/text/txtcache.hxx10
-rw-r--r--sw/source/core/text/txtdrop.cxx92
-rw-r--r--sw/source/core/text/txtfld.cxx50
-rw-r--r--sw/source/core/text/txtfrm.cxx10
-rw-r--r--sw/source/core/text/txtftn.cxx82
-rw-r--r--sw/source/core/text/txthyph.cxx14
-rw-r--r--sw/source/core/text/txtpaint.cxx38
-rw-r--r--sw/source/core/text/txtpaint.hxx20
-rw-r--r--sw/source/core/text/txttab.cxx28
-rw-r--r--sw/source/core/text/widorp.cxx32
-rw-r--r--sw/source/core/text/widorp.hxx14
-rw-r--r--sw/source/core/text/xmldump.cxx458
-rw-r--r--sw/source/core/tox/ToxLinkProcessor.cxx21
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx32
-rw-r--r--sw/source/core/tox/toxhlp.cxx12
-rw-r--r--sw/source/core/tox/txmsrt.cxx127
-rw-r--r--sw/source/core/txtnode/SwGrammarContact.cxx103
-rw-r--r--sw/source/core/txtnode/atrfld.cxx8
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx1
-rw-r--r--sw/source/core/txtnode/atrftn.cxx29
-rw-r--r--sw/source/core/txtnode/chrfmt.cxx11
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx13
-rw-r--r--sw/source/core/txtnode/fntcache.cxx162
-rw-r--r--sw/source/core/txtnode/fntcap.cxx238
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx110
-rw-r--r--sw/source/core/txtnode/swfont.cxx20
-rw-r--r--sw/source/core/txtnode/thints.cxx10
-rw-r--r--sw/source/core/txtnode/txatbase.cxx19
-rw-r--r--sw/source/core/txtnode/txtedt.cxx6
-rw-r--r--sw/source/core/undo/docundo.cxx9
-rw-r--r--sw/source/core/undo/rolbck.cxx30
-rw-r--r--sw/source/core/undo/unattr.cxx1
-rw-r--r--sw/source/core/undo/undel.cxx6
-rw-r--r--sw/source/core/undo/undobj.cxx17
-rw-r--r--sw/source/core/undo/undobj1.cxx13
-rw-r--r--sw/source/core/undo/undraw.cxx15
-rw-r--r--sw/source/core/undo/unins.cxx1
-rw-r--r--sw/source/core/undo/untbl.cxx92
-rw-r--r--sw/source/core/undo/untblk.cxx16
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx10
-rw-r--r--sw/source/core/unocore/TextCursorHelper.cxx8
-rw-r--r--sw/source/core/unocore/unobkm.cxx12
-rw-r--r--sw/source/core/unocore/unochart.cxx45
-rw-r--r--sw/source/core/unocore/unocoll.cxx7
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx18
-rw-r--r--sw/source/core/unocore/unodraw.cxx59
-rw-r--r--sw/source/core/unocore/unoevent.cxx10
-rw-r--r--sw/source/core/unocore/unofield.cxx24
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx8
-rw-r--r--sw/source/core/unocore/unoframe.cxx25
-rw-r--r--sw/source/core/unocore/unoftn.cxx14
-rw-r--r--sw/source/core/unocore/unoidx.cxx26
-rw-r--r--sw/source/core/unocore/unomap.cxx3
-rw-r--r--sw/source/core/unocore/unomap1.cxx5
-rw-r--r--sw/source/core/unocore/unoobj.cxx42
-rw-r--r--sw/source/core/unocore/unoobj2.cxx24
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx32
-rw-r--r--sw/source/core/unocore/unoport.cxx18
-rw-r--r--sw/source/core/unocore/unoportenum.cxx43
-rw-r--r--sw/source/core/unocore/unoredline.cxx10
-rw-r--r--sw/source/core/unocore/unorefmk.cxx20
-rw-r--r--sw/source/core/unocore/unosect.cxx20
-rw-r--r--sw/source/core/unocore/unosett.cxx26
-rw-r--r--sw/source/core/unocore/unosrch.cxx461
-rw-r--r--sw/source/core/unocore/unostyle.cxx189
-rw-r--r--sw/source/core/unocore/unotbl.cxx67
-rw-r--r--sw/source/core/unocore/unotext.cxx21
-rw-r--r--sw/source/core/view/printdata.cxx4
-rw-r--r--sw/source/core/view/vdraw.cxx1
-rw-r--r--sw/source/core/view/viewsh.cxx20
-rw-r--r--sw/source/core/view/vnew.cxx1
-rw-r--r--sw/source/core/view/vprint.cxx1
-rw-r--r--sw/source/core/view/vprint.hxx7
-rw-r--r--sw/source/filter/ascii/ascatr.cxx4
-rw-r--r--sw/source/filter/basflt/fltshell.cxx5
-rw-r--r--sw/source/filter/basflt/shellio.cxx3
-rw-r--r--sw/source/filter/html/css1atr.cxx92
-rw-r--r--sw/source/filter/html/htmlcss1.cxx2
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx1
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx1
-rw-r--r--sw/source/filter/html/htmlfldw.cxx2
-rw-r--r--sw/source/filter/html/htmlfly.hxx1
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx1
-rw-r--r--sw/source/filter/html/htmlforw.cxx1
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
-rw-r--r--sw/source/filter/html/htmlreqifreader.cxx27
-rw-r--r--sw/source/filter/html/htmlreqifreader.hxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx22
-rw-r--r--sw/source/filter/html/htmltabw.cxx6
-rw-r--r--sw/source/filter/html/swhtml.cxx20
-rw-r--r--sw/source/filter/html/swhtml.hxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx4
-rw-r--r--sw/source/filter/inc/fltshell.hxx4
-rw-r--r--sw/source/filter/inc/msfilter.hxx2
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx12
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx609
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx45
-rw-r--r--sw/source/filter/ww8/docxexport.cxx77
-rw-r--r--sw/source/filter/ww8/docxexport.hxx7
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx166
-rw-r--r--sw/source/filter/ww8/docxsdrexport.hxx2
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.cxx55
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx65
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx13
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx12
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx4
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx2
-rw-r--r--sw/source/filter/ww8/rtfstringbuffer.cxx4
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx53
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx17
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx53
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx6
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx28
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx11
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx170
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx8
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx1
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx588
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx8
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx59
-rw-r--r--sw/source/filter/ww8/ww8par.cxx39
-rw-r--r--sw/source/filter/ww8/ww8par.hxx39
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx1
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx10
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx5
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx25
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx38
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx41
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx8
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx2
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx6
-rw-r--r--sw/source/filter/xml/swxml.cxx16
-rw-r--r--sw/source/filter/xml/wrtxml.cxx19
-rw-r--r--sw/source/filter/xml/xmlexp.cxx22
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx5
-rw-r--r--sw/source/filter/xml/xmlimp.cxx33
-rw-r--r--sw/source/filter/xml/xmlitem.cxx2
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx1
-rw-r--r--sw/source/filter/xml/xmltble.cxx11
-rw-r--r--sw/source/filter/xml/xmltbli.cxx65
-rw-r--r--sw/source/filter/xml/xmltbli.hxx10
-rw-r--r--sw/source/filter/xml/xmltexte.cxx2
-rw-r--r--sw/source/filter/xml/zorder.hxx78
-rw-r--r--sw/source/ui/chrdlg/break.cxx1
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx1
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx1
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx4
-rw-r--r--sw/source/ui/config/optcomp.cxx1
-rw-r--r--sw/source/ui/config/optpage.cxx12
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx6
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx5
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx24
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx9
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx8
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx46
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx3
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx5
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx67
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx1
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx4
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx4
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx1
-rw-r--r--sw/source/ui/envelp/envfmt.cxx1
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx2
-rw-r--r--sw/source/ui/fldui/changedb.cxx2
-rw-r--r--sw/source/ui/fldui/flddb.cxx4
-rw-r--r--sw/source/ui/fldui/flddb.hxx1
-rw-r--r--sw/source/ui/fldui/fldedt.cxx2
-rw-r--r--sw/source/ui/fldui/fldref.cxx1
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx1
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx16
-rw-r--r--sw/source/ui/frmdlg/column.cxx3
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx1
-rw-r--r--sw/source/ui/index/cnttab.cxx2
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx109
-rw-r--r--sw/source/ui/misc/docfnote.cxx4
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx5
-rw-r--r--sw/source/ui/misc/linenum.cxx2
-rw-r--r--sw/source/ui/misc/num.cxx1
-rw-r--r--sw/source/ui/misc/outline.cxx13
-rw-r--r--sw/source/ui/misc/pgfnote.cxx3
-rw-r--r--sw/source/ui/misc/pggrid.cxx3
-rw-r--r--sw/source/ui/misc/titlepage.cxx34
-rw-r--r--sw/source/ui/table/instable.cxx26
-rw-r--r--sw/source/ui/table/tabledlg.cxx1
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx4
-rw-r--r--sw/source/ui/vba/vbaapplication.cxx2
-rw-r--r--sw/source/ui/vba/vbaapplication.hxx3
-rw-r--r--sw/source/ui/vba/vbadocument.cxx2
-rw-r--r--sw/source/ui/vba/vbadocuments.cxx7
-rw-r--r--sw/source/ui/vba/vbalisthelper.cxx16
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.cxx2
-rw-r--r--sw/source/ui/vba/vbawindow.cxx1
-rw-r--r--sw/source/uibase/app/appenv.cxx1
-rw-r--r--sw/source/uibase/app/applab.cxx1
-rw-r--r--sw/source/uibase/app/appopt.cxx32
-rw-r--r--sw/source/uibase/app/docsh.cxx1
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
-rw-r--r--sw/source/uibase/app/docshdrw.cxx2
-rw-r--r--sw/source/uibase/app/docst.cxx49
-rw-r--r--sw/source/uibase/app/docstyle.cxx9
-rw-r--r--sw/source/uibase/app/swmodul1.cxx1
-rw-r--r--sw/source/uibase/app/swmodule.cxx63
-rw-r--r--sw/source/uibase/config/StoredChapterNumbering.cxx2
-rw-r--r--sw/source/uibase/config/uinums.cxx9
-rw-r--r--sw/source/uibase/config/usrpref.cxx1
-rw-r--r--sw/source/uibase/config/viewopt.cxx6
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx21
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx14
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx6
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx20
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx1
-rw-r--r--sw/source/uibase/dialog/watermarkdialog.cxx2
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx1
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx67
-rw-r--r--sw/source/uibase/docvw/AnnotationMenuButton.cxx213
-rw-r--r--sw/source/uibase/docvw/AnnotationMenuButton.hxx51
-rw-r--r--sw/source/uibase/docvw/AnnotationWin.cxx89
-rw-r--r--sw/source/uibase/docvw/AnnotationWin2.cxx785
-rw-r--r--sw/source/uibase/docvw/DashedLine.cxx8
-rw-r--r--sw/source/uibase/docvw/FrameControlsManager.cxx8
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx12
-rw-r--r--sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx178
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx5
-rw-r--r--sw/source/uibase/docvw/SidebarScrollBar.cxx73
-rw-r--r--sw/source/uibase/docvw/SidebarScrollBar.hxx40
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx368
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.hxx55
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControlAcc.cxx271
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControlAcc.hxx43
-rw-r--r--sw/source/uibase/docvw/SidebarWinAcc.cxx5
-rw-r--r--sw/source/uibase/docvw/edtdd.cxx1
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx134
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx19
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx4
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx4
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx1
-rw-r--r--sw/source/uibase/inc/FrameControl.hxx1
-rw-r--r--sw/source/uibase/inc/OutlineContentVisibilityWin.hxx16
-rw-r--r--sw/source/uibase/inc/abstract.hxx5
-rw-r--r--sw/source/uibase/inc/annotsh.hxx2
-rw-r--r--sw/source/uibase/inc/basesh.hxx8
-rw-r--r--sw/source/uibase/inc/beziersh.hxx2
-rw-r--r--sw/source/uibase/inc/column.hxx3
-rw-r--r--sw/source/uibase/inc/conarc.hxx2
-rw-r--r--sw/source/uibase/inc/concustomshape.hxx2
-rw-r--r--sw/source/uibase/inc/conform.hxx2
-rw-r--r--sw/source/uibase/inc/conpoly.hxx2
-rw-r--r--sw/source/uibase/inc/conrect.hxx2
-rw-r--r--sw/source/uibase/inc/content.hxx12
-rw-r--r--sw/source/uibase/inc/conttree.hxx18
-rw-r--r--sw/source/uibase/inc/drawsh.hxx2
-rw-r--r--sw/source/uibase/inc/drwtxtsh.hxx2
-rw-r--r--sw/source/uibase/inc/fldmgr.hxx2
-rw-r--r--sw/source/uibase/inc/glshell.hxx6
-rw-r--r--sw/source/uibase/inc/inputwin.hxx3
-rw-r--r--sw/source/uibase/inc/mediash.hxx2
-rw-r--r--sw/source/uibase/inc/mmconfigitem.hxx8
-rw-r--r--sw/source/uibase/inc/navipi.hxx35
-rw-r--r--sw/source/uibase/inc/navsh.hxx2
-rw-r--r--sw/source/uibase/inc/olesh.hxx4
-rw-r--r--sw/source/uibase/inc/redlndlg.hxx3
-rw-r--r--sw/source/uibase/inc/swdtflvr.hxx2
-rw-r--r--sw/source/uibase/inc/swrenamexnameddlg.hxx2
-rw-r--r--sw/source/uibase/inc/swuicnttab.hxx2
-rw-r--r--sw/source/uibase/inc/uinums.hxx2
-rw-r--r--sw/source/uibase/inc/uiobject.hxx20
-rw-r--r--sw/source/uibase/inc/unodispatch.hxx4
-rw-r--r--sw/source/uibase/inc/unomod.hxx3
-rw-r--r--sw/source/uibase/inc/unotools.hxx2
-rw-r--r--sw/source/uibase/inc/unotxvw.hxx9
-rw-r--r--sw/source/uibase/inc/wformsh.hxx2
-rw-r--r--sw/source/uibase/inc/wfrmsh.hxx2
-rw-r--r--sw/source/uibase/inc/wgrfsh.hxx2
-rw-r--r--sw/source/uibase/inc/wlistsh.hxx2
-rw-r--r--sw/source/uibase/inc/wolesh.hxx2
-rw-r--r--sw/source/uibase/inc/workctrl.hxx6
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx5
-rw-r--r--sw/source/uibase/inc/wtabsh.hxx2
-rw-r--r--sw/source/uibase/inc/wtextsh.hxx2
-rw-r--r--sw/source/uibase/inc/wview.hxx4
-rw-r--r--sw/source/uibase/index/toxmgr.cxx18
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx1
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx1
-rw-r--r--sw/source/uibase/lingu/sdrhhcwrap.cxx3
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx6
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx13
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx51
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx42
-rw-r--r--sw/source/uibase/shells/annotsh.cxx13
-rw-r--r--sw/source/uibase/shells/basesh.cxx23
-rw-r--r--sw/source/uibase/shells/drawsh.cxx28
-rw-r--r--sw/source/uibase/shells/drformsh.cxx1
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx1
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx1
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx12
-rw-r--r--sw/source/uibase/shells/grfsh.cxx1
-rw-r--r--sw/source/uibase/shells/langhelper.cxx15
-rw-r--r--sw/source/uibase/shells/listsh.cxx11
-rw-r--r--sw/source/uibase/shells/olesh.cxx48
-rw-r--r--sw/source/uibase/shells/tabsh.cxx10
-rw-r--r--sw/source/uibase/shells/textdrw.cxx1
-rw-r--r--sw/source/uibase/shells/textfld.cxx7
-rw-r--r--sw/source/uibase/shells/textglos.cxx1
-rw-r--r--sw/source/uibase/shells/textidx.cxx1
-rw-r--r--sw/source/uibase/shells/textsh.cxx5
-rw-r--r--sw/source/uibase/shells/textsh1.cxx57
-rw-r--r--sw/source/uibase/shells/textsh2.cxx1
-rw-r--r--sw/source/uibase/shells/txtattr.cxx1
-rw-r--r--sw/source/uibase/shells/txtcrsr.cxx1
-rw-r--r--sw/source/uibase/shells/txtnum.cxx13
-rw-r--r--sw/source/uibase/sidebar/PageColumnPopup.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageFooterPanel.cxx24
-rw-r--r--sw/source/uibase/sidebar/PageFooterPanel.hxx17
-rw-r--r--sw/source/uibase/sidebar/PageFormatPanel.cxx23
-rw-r--r--sw/source/uibase/sidebar/PageFormatPanel.hxx19
-rw-r--r--sw/source/uibase/sidebar/PageHeaderPanel.cxx23
-rw-r--r--sw/source/uibase/sidebar/PageHeaderPanel.hxx18
-rw-r--r--sw/source/uibase/sidebar/PageMarginPopup.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageOrientationControl.hxx5
-rw-r--r--sw/source/uibase/sidebar/PageOrientationPopup.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageSizePopup.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageStylesPanel.cxx27
-rw-r--r--sw/source/uibase/sidebar/PageStylesPanel.hxx15
-rw-r--r--sw/source/uibase/sidebar/StylePresetsPanel.cxx21
-rw-r--r--sw/source/uibase/sidebar/StylePresetsPanel.hxx17
-rw-r--r--sw/source/uibase/sidebar/SwPanelFactory.cxx54
-rw-r--r--sw/source/uibase/sidebar/TableEditPanel.cxx19
-rw-r--r--sw/source/uibase/sidebar/TableEditPanel.hxx17
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx19
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.hxx14
-rw-r--r--sw/source/uibase/sidebar/WrapPropertyPanel.cxx21
-rw-r--r--sw/source/uibase/sidebar/WrapPropertyPanel.hxx7
-rw-r--r--sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx143
-rw-r--r--sw/source/uibase/sidebar/WriterInspectorTextPanel.hxx7
-rw-r--r--sw/source/uibase/table/chartins.cxx6
-rw-r--r--sw/source/uibase/uitest/uiobject.cxx40
-rw-r--r--sw/source/uibase/uiview/pview.cxx3
-rw-r--r--sw/source/uibase/uiview/srcview.cxx3
-rw-r--r--sw/source/uibase/uiview/swcli.cxx1
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx2
-rw-r--r--sw/source/uibase/uiview/view.cxx88
-rw-r--r--sw/source/uibase/uiview/view0.cxx1
-rw-r--r--sw/source/uibase/uiview/view2.cxx191
-rw-r--r--sw/source/uibase/uiview/viewcoll.cxx1
-rw-r--r--sw/source/uibase/uiview/viewdlg.cxx1
-rw-r--r--sw/source/uibase/uiview/viewdlg2.cxx1
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx48
-rw-r--r--sw/source/uibase/uiview/viewling.cxx1
-rw-r--r--sw/source/uibase/uiview/viewport.cxx1
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx5
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx33
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx1
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx26
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx20
-rw-r--r--sw/source/uibase/uno/unodispatch.cxx13
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx10
-rw-r--r--sw/source/uibase/uno/unomod.cxx8
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx119
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx47
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx19
-rw-r--r--sw/source/uibase/utlui/bookctrl.cxx47
-rw-r--r--sw/source/uibase/utlui/content.cxx278
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx17
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx1
-rw-r--r--sw/source/uibase/utlui/navipi.cxx180
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx1
-rw-r--r--sw/source/uibase/utlui/shdwcrsr.cxx1
-rw-r--r--sw/source/uibase/utlui/tmplctrl.cxx51
-rw-r--r--sw/source/uibase/utlui/uitool.cxx53
-rw-r--r--sw/source/uibase/utlui/wordcountctrl.cxx10
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx1
-rw-r--r--sw/source/uibase/wrtsh/select.cxx1
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx11
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx22
-rw-r--r--sw/source/uibase/wrtsh/wrtsh3.cxx1
-rw-r--r--sw/source/uibase/wrtsh/wrtundo.cxx1
-rw-r--r--sw/uiconfig/sglobal/menubar/menubar.xml7
-rw-r--r--sw/uiconfig/sglobal/popupmenu/table.xml3
-rw-r--r--sw/uiconfig/sglobal/popupmenu/text.xml3
-rw-r--r--sw/uiconfig/sglobal/toolbar/numobjectbar.xml2
-rw-r--r--sw/uiconfig/sweb/menubar/menubar.xml4
-rw-r--r--sw/uiconfig/sweb/popupmenu/table.xml3
-rw-r--r--sw/uiconfig/sweb/popupmenu/text.xml3
-rw-r--r--sw/uiconfig/sweb/toolbar/numobjectbar.xml2
-rw-r--r--sw/uiconfig/swform/menubar/menubar.xml4
-rw-r--r--sw/uiconfig/swform/popupmenu/table.xml3
-rw-r--r--sw/uiconfig/swform/popupmenu/text.xml3
-rw-r--r--sw/uiconfig/swform/toolbar/numobjectbar.xml2
-rw-r--r--sw/uiconfig/swreport/menubar/menubar.xml4
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml26
-rw-r--r--sw/uiconfig/swriter/popupmenu/table.xml3
-rw-r--r--sw/uiconfig/swriter/popupmenu/text.xml3
-rw-r--r--sw/uiconfig/swriter/toolbar/numobjectbar.xml2
-rw-r--r--sw/uiconfig/swriter/toolbar/textobjectbar.xml1
-rw-r--r--sw/uiconfig/swriter/ui/annotation.ui243
-rw-r--r--sw/uiconfig/swriter/ui/annotationmenu.ui95
-rw-r--r--sw/uiconfig/swriter/ui/bibliofragment.ui37
-rw-r--r--sw/uiconfig/swriter/ui/bookmarkmenu.ui9
-rw-r--r--sw/uiconfig/swriter/ui/bulletsandnumbering.ui10
-rw-r--r--sw/uiconfig/swriter/ui/calendar.ui38
-rw-r--r--sw/uiconfig/swriter/ui/characterproperties.ui6
-rw-r--r--sw/uiconfig/swriter/ui/conditionpage.ui22
-rw-r--r--sw/uiconfig/swriter/ui/floatingnavigation.ui2
-rw-r--r--sw/uiconfig/swriter/ui/footnoteareapage.ui21
-rw-r--r--sw/uiconfig/swriter/ui/footnotepage.ui2
-rw-r--r--sw/uiconfig/swriter/ui/footnotesendnotestabpage.ui4
-rw-r--r--sw/uiconfig/swriter/ui/formdropdown.ui72
-rw-r--r--sw/uiconfig/swriter/ui/frmtypepage.ui824
-rw-r--r--sw/uiconfig/swriter/ui/linenumbering.ui4
-rw-r--r--sw/uiconfig/swriter/ui/mmselectpage.ui46
-rw-r--r--sw/uiconfig/swriter/ui/navigatorcontextmenu.ui2
-rw-r--r--sw/uiconfig/swriter/ui/navigatorpanel.ui6
-rw-r--r--sw/uiconfig/swriter/ui/notebookbar.ui231
-rw-r--r--sw/uiconfig/swriter/ui/notebookbar_compact.ui36
-rw-r--r--sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui4
-rw-r--r--sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui4
-rw-r--r--sw/uiconfig/swriter/ui/notebookbar_online.ui95
-rw-r--r--sw/uiconfig/swriter/ui/numberingnamedialog.ui6
-rw-r--r--sw/uiconfig/swriter/ui/numparapage.ui19
-rw-r--r--sw/uiconfig/swriter/ui/outlinebutton.ui4
-rw-r--r--sw/uiconfig/swriter/ui/outlinenumbering.ui6
-rw-r--r--sw/uiconfig/swriter/ui/outlinenumberingpage.ui4
-rw-r--r--sw/uiconfig/swriter/ui/outlinepositionpage.ui2
-rw-r--r--sw/uiconfig/swriter/ui/pagestylemenu.ui9
-rw-r--r--sw/uiconfig/swriter/ui/paradialog.ui9
-rw-r--r--sw/uiconfig/swriter/ui/readonlymenu.ui4
-rw-r--r--sw/uiconfig/swriter/ui/spellmenu.ui78
-rw-r--r--sw/uiconfig/swriter/ui/templatedialog1.ui5
-rw-r--r--sw/uiconfig/swriter/ui/templatedialog16.ui13
-rw-r--r--sw/uiconfig/swriter/ui/templatedialog2.ui3
-rw-r--r--sw/uiconfig/swriter/ui/tocentriespage.ui4
-rw-r--r--sw/uiconfig/swriter/ui/viewoptionspage.ui4
-rw-r--r--sw/uiconfig/swxform/menubar/menubar.xml4
-rw-r--r--sw/uiconfig/swxform/popupmenu/table.xml3
-rw-r--r--sw/uiconfig/swxform/popupmenu/text.xml3
-rw-r--r--sw/uiconfig/swxform/toolbar/numobjectbar.xml2
1161 files changed, 18453 insertions, 10853 deletions
diff --git a/sw/CppunitTest_sw_core_fields.mk b/sw/CppunitTest_sw_core_fields.mk
new file mode 100644
index 000000000000..c8c982da4cc8
--- /dev/null
+++ b/sw/CppunitTest_sw_core_fields.mk
@@ -0,0 +1,76 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# 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/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_core_fields))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_fields))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_fields, \
+ sw/qa/core/fields/fields \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_fields, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ sfx \
+ sw \
+ swqahelper \
+ test \
+ unotest \
+ utl \
+ vcl \
+ svt \
+ tl \
+ svl \
+ svxcore \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_fields,\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_fields,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/uibase/inc \
+ -I$(SRCDIR)/sw/qa/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_fields,\
+ udkapi \
+ offapi \
+ oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_fields))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_fields))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_fields,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_fields,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_fields))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_fields, \
+ modules/swriter \
+ svt \
+ svx \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_fields))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_core_text.mk b/sw/CppunitTest_sw_core_text.mk
index b0c4d03fac38..cb4801accac9 100644
--- a/sw/CppunitTest_sw_core_text.mk
+++ b/sw/CppunitTest_sw_core_text.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_text, \
sw \
swqahelper \
test \
+ tl \
unotest \
utl \
vcl \
diff --git a/sw/CppunitTest_sw_core_tox.mk b/sw/CppunitTest_sw_core_tox.mk
new file mode 100644
index 000000000000..4a99347239f5
--- /dev/null
+++ b/sw/CppunitTest_sw_core_tox.mk
@@ -0,0 +1,76 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# 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/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_core_tox))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_tox))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_tox, \
+ sw/qa/core/tox/tox \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_tox, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ sfx \
+ sw \
+ swqahelper \
+ test \
+ unotest \
+ utl \
+ vcl \
+ svt \
+ tl \
+ svl \
+ svxcore \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_tox,\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_tox,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/uibase/inc \
+ -I$(SRCDIR)/sw/qa/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_tox,\
+ udkapi \
+ offapi \
+ oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_tox))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_tox))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_tox,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_tox,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_tox))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_tox, \
+ modules/swriter \
+ svt \
+ svx \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_tox))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_odfexport2.mk b/sw/CppunitTest_sw_odfexport2.mk
new file mode 100644
index 000000000000..4ad073a9e2e2
--- /dev/null
+++ b/sw/CppunitTest_sw_odfexport2.mk
@@ -0,0 +1,72 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# 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/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_odfexport2))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_odfexport2))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_odfexport2, \
+ sw/qa/extras/odfexport/odfexport2 \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_odfexport2, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ sfx \
+ svl \
+ sw \
+ swqahelper \
+ test \
+ tl \
+ unotest \
+ utl \
+ vcl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_odfexport2,\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_odfexport2,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/qa/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_odfexport2,\
+ udkapi \
+ offapi \
+ oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_odfexport2))
+$(eval $(call gb_CppunitTest_use_vcl,sw_odfexport2))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_odfexport2,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_odfexport2,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_odfexport2))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_odfexport2, \
+ modules/swriter \
+ svx \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_odfexport2))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_odfimport.mk b/sw/CppunitTest_sw_odfimport.mk
index 61a1547dd473..dabab5254279 100644
--- a/sw/CppunitTest_sw_odfimport.mk
+++ b/sw/CppunitTest_sw_odfimport.mk
@@ -19,11 +19,13 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sw_odfimport, \
$(eval $(call gb_CppunitTest_use_libraries,sw_odfimport, \
comphelper \
+ editeng \
cppu \
cppuhelper \
sal \
svt \
sfx \
+ svl \
sw \
swqahelper \
test \
diff --git a/sw/CppunitTest_sw_ooxmlexport5.mk b/sw/CppunitTest_sw_ooxmlexport5.mk
index 408ea3e79ad8..71eea4a09b69 100644
--- a/sw/CppunitTest_sw_ooxmlexport5.mk
+++ b/sw/CppunitTest_sw_ooxmlexport5.mk
@@ -11,10 +11,6 @@
$(eval $(call sw_ooxmlexport_test,5))
-$(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlexport5, \
- gie \
-))
-
$(eval $(call gb_CppunitTest_use_uiconfigs,sw_ooxmlexport5, \
svt \
svx \
diff --git a/sw/CppunitTest_sw_ooxmlimport2.mk b/sw/CppunitTest_sw_ooxmlimport2.mk
index 97fc1e7b1e6d..67c4077fcecd 100644
--- a/sw/CppunitTest_sw_ooxmlimport2.mk
+++ b/sw/CppunitTest_sw_ooxmlimport2.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport2, \
tl \
vcl \
svxcore \
+ svl\
))
$(eval $(call gb_CppunitTest_use_externals,sw_ooxmlimport2,\
@@ -74,8 +75,4 @@ $(eval $(call gb_CppunitTest_use_rdb,sw_ooxmlimport2,services))
$(eval $(call gb_CppunitTest_use_configuration,sw_ooxmlimport2))
-# At least testTdf115094::Import (sw/qa/extras/ooxmlimport/ooxmlimport2.cxx) depends on TIFFReader
-# from Library_gie, which is loaded dynamically in vcl/source/filter/graphicfilter.cxx:
-$(call gb_CppunitTest_get_target,sw_ooxmlimport2): $(call gb_Library_get_target,gie)
-
# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_ww8export.mk b/sw/CppunitTest_sw_ww8export.mk
index beec46f3cc7f..e338a15f1947 100644
--- a/sw/CppunitTest_sw_ww8export.mk
+++ b/sw/CppunitTest_sw_ww8export.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ww8export, \
sw \
swqahelper \
tl \
+ vcl \
))
$(eval $(call gb_CppunitTest_use_externals,sw_ww8export,\
diff --git a/sw/CppunitTest_sw_ww8export2.mk b/sw/CppunitTest_sw_ww8export2.mk
index a6ecae976280..0011658418f9 100644
--- a/sw/CppunitTest_sw_ww8export2.mk
+++ b/sw/CppunitTest_sw_ww8export2.mk
@@ -59,8 +59,11 @@ $(eval $(call gb_CppunitTest_use_rdb,sw_ww8export2,services))
$(eval $(call gb_CppunitTest_use_configuration,sw_ww8export2))
-# At least testTdf118133::Import_Export_Import (sw/qa/extras/ww8export/ww8export2.cxx) depends on
-# TIFFReader from Library_gie, which is loaded dynamically in vcl/source/filter/graphicfilter.cxx:
-$(call gb_CppunitTest_get_target,sw_ww8export2): $(call gb_Library_get_target,gie)
+ifeq ($(OS),WNT)
+# gpgme-w32spawn.exe is needed in workdir/LinkTarget/Executable
+$(eval $(call gb_CppunitTest_use_packages,sw_ww8export2,\
+ $(call gb_Helper_optional,GPGMEPP,gpgmepp)\
+))
+endif
# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_ww8export3.mk b/sw/CppunitTest_sw_ww8export3.mk
index a0b3e3837f5a..6eeb48f3ed3b 100644
--- a/sw/CppunitTest_sw_ww8export3.mk
+++ b/sw/CppunitTest_sw_ww8export3.mk
@@ -56,6 +56,17 @@ $(eval $(call gb_CppunitTest_use_vcl,sw_ww8export3))
$(eval $(call gb_CppunitTest_use_rdb,sw_ww8export3,services))
+ifeq ($(OS),WNT)
+# gpgme-w32spawn.exe is needed in workdir/LinkTarget/Executable
+$(eval $(call gb_CppunitTest_use_packages,sw_ww8export3,\
+ $(call gb_Helper_optional,GPGMEPP,gpgmepp)\
+))
+endif
+
$(eval $(call gb_CppunitTest_use_configuration,sw_ww8export3))
+$(eval $(call gb_CppunitTest_use_packages,sw_ww8export3,\
+ oox_customshapes \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 65f4154bf12e..3ba73c8ae9af 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -124,6 +124,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/access/acctextframe \
sw/source/core/access/parachangetrackinginfo \
sw/source/core/access/textmarkuphelper \
+ sw/source/core/attr/BorderCacheOwner \
sw/source/core/attr/calbck \
sw/source/core/attr/cellatr \
sw/source/core/attr/fmtfollowtextflow \
@@ -618,9 +619,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/uibase/docvw/OverlayRanges \
sw/source/uibase/docvw/PostItMgr \
sw/source/uibase/docvw/ShadowOverlayObject \
- sw/source/uibase/docvw/SidebarScrollBar \
sw/source/uibase/docvw/SidebarTxtControl \
- sw/source/uibase/docvw/SidebarTxtControlAcc \
sw/source/uibase/docvw/SidebarWinAcc \
sw/source/uibase/docvw/HeaderFooterWin \
sw/source/uibase/docvw/OutlineContentVisibilityWin \
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 123b7acf5321..07a79c3ad951 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -96,6 +96,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_ww8import \
CppunitTest_sw_rtfimport \
CppunitTest_sw_odfexport \
+ CppunitTest_sw_odfexport2 \
CppunitTest_sw_odfimport \
CppunitTest_sw_txtexport \
CppunitTest_sw_txtimport \
@@ -120,6 +121,8 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_uibase_uno \
CppunitTest_sw_core_accessibilitycheck \
CppunitTest_sw_core_layout \
+ CppunitTest_sw_core_fields \
+ CppunitTest_sw_core_tox \
CppunitTest_sw_core_frmedt \
CppunitTest_sw_core_txtnode \
CppunitTest_sw_core_objectpositioning \
diff --git a/sw/README b/sw/README
deleted file mode 100644
index 54feb78fa7d1..000000000000
--- a/sw/README
+++ /dev/null
@@ -1,211 +0,0 @@
-Writer application code.
-
-Exact history was lost before Sept. 18th, 2000, but old source code
-comments show that Writer core dates back until at least November
-1990.
-
-== Module contents ==
- * inc: headers available to all source files inside the module
- * qa: unit, slow and subsequent tests
- * sdi
- * source: see below
- * uiconfig: user interface configuration
- * util: UNO passive registration config
-
-== Source contents ==
- * core: Writer core (document model, layout, UNO API implementation)
- * filter: Writer internal filters
- * ascii: plain text filter
- * basflt
- * docx: wrapper for the UNO DOCX import filter (in writerfilter) for autotext purposes
- * html: HTML filter
- * inc: include files for filters
- * rtf: thin copy&paste helper around the UNO RTF import filter (in writerfilter)
- * writer
- * ww8: DOC import, DOC/DOCX/RTF export
- * xml: ODF import/export, subclassed from xmloff (where most of the work is done)
- * uibase: user interface (those parts that are linked into sw & always loaded)
- * ui: user interface (optional parts that are loaded on demand (swui))
-
-== Core ==
-
-There is a good overview documentation of basic architecture of Writer core
-in the OOo wiki:
-
-http://wiki.openoffice.org/wiki/Writer/Core_And_Layout
-http://wiki.openoffice.org/wiki/Writer/Text_Formatting
-
-Writer specific WhichIds are defined in sw/inc/hintids.hxx.
-
-The details below are mainly about details missing from the Wiki pages.
-
-=== SwDoc ===
-
-The central class for a document is SwDoc, which represents a document.
-
-A lot of the functionality is split out into separate Manager classes,
-each of which implements some IDocument* interface; there are
-SwDoc::getIDocument*() methods to retrieve the managers.
-
-However there are still too many members and methods in this class,
-many of which could be moved to some Manager or other...
-
-=== SwNodes ===
-
-Basically a (fancy) array of SwNode pointers. There are special subclasses of
-SwNode (SwStartNode and SwEndNode) which are used to encode a nested tree
-structure into the flat array; the range of nodes from SwStartNode to its
-corresponding SwEndNode is sometimes called a "section" (but is not necessarily
-what the high-level document model calls a "Section"; that is just one of the
-possibilities).
-
-The SwNodes contains the following top-level sections:
-
-1. Empty
-2. Footnote content
-3. Frame / Header / Footer content
-4. Deleted Change Tracking content
-5. Body content
-
-=== Undo ===
-
-The Undo/Redo information is stored in a sw::UndoManager member of SwDoc,
-which implements the IDocumentUndoRedo interface.
-Its members include a SwNodes array containing the document content that
-is currently not in the actual document but required for Undo/Redo, and
-a stack of SwUndo actions, each of which represents one user-visible
-Undo/Redo step.
-
-There are also ListActions which internally contain several individual SwUndo
-actions; these are created by the StartUndo/EndUndo wrapper methods.
-
-=== Text Attributes ===
-
-The sub-structure of paragraphs is stored in the SwpHintsArray member
-SwTextNode::m_pSwpHints. There is a base class SwTextAttr with numerous
-subclasses; the SwTextAttr has a start and end index and a SfxPoolItem
-to store the actual formatting attribute.
-
-There are several sub-categories of SwTextAttr:
-
-- formatting attributes: Character Styles (SwTextCharFormat, RES_TXTATR_CHARFMT)
- and Automatic Styles (no special class, RES_TXTATR_AUTOFMT):
- these are handled by SwpHintsArray::BuildPortions and MergePortions,
- which create non-overlapping portions of formatting attributes.
-
-- nesting attributes: Hyperlinks (SwTextINetFormat, RES_TXTATR_INETFMT),
- Ruby (SwTextRuby, RES_TXTATR_CJK_RUBY) and Meta/MetaField (SwTextMeta,
- RES_TXTATR_META/RES_TXTATR_METAFIELD):
- these maintain a properly nested tree structure.
- The Meta/Metafield are "special" because they have both start/end
- and a dummy character at the start.
-
-- misc. attributes: Reference Marks, ToX Marks
-
-- attributes without end: Fields, Footnotes, Flys (AS_CHAR)
- These all have a corresponding dummy character in the paragraph text, which
- is a placeholder for the "expansion" of the attribute, e.g. field content.
-
-=== Fields ===
-
-There are multiple model classes involved for fields:
-
-- enum SwFieldIds enumerates the different types of fields.
-- SwFieldType contains some shared stuff for all fields of a type.
- There are many subclasses of SwFieldType, one for each different type
- of field.
- For most types of fields there is one shared instance of this per type,
- which is created in DocumentFieldsManager::InitFieldTypes()
- but for some there are more than one, and they are dynamically created, see
- DocumentFieldsManager::InsertFieldType(). An example for the latter are
- variable fields (SwFieldIds::GetExp/SwFieldIds::SetExp), with one SwFieldType per
- variable.
-- SwXFieldMaster is the UNO wrapper of a field type.
- It is a SwClient registered at the SwFieldType.
- Its life-cycle is determined by UNO clients outside of sw; it will get
- disposed when the SwFieldType dies.
-- SwFormatField is the SfxPoolItem of a field.
- The SwFormatField is a SwClient registered at its SwFieldType.
- The SwFormatField owns the SwField of the field.
-- SwField contains the core logic of a field.
- The SwField is owned by the SwFormatField of the field.
- There are many subclasses of SwField, one for each different type of field.
- Note that there are not many places that can Expand the field to its
- correct value, since for example page number fields require a View
- with an up to date layout; therefore the correct expansion is cached.
-- SwTextField is the text attribute of a field.
- It owns the SwFormatField of the field (like all text attributes).
-- SwXTextField is the UNO wrapper object of a field.
- It is a SwClient registered at the SwFormatField.
- Its life-cycle is determined by UNO clients outside of sw; it will get
- disposed when the SwFormatField dies.
-
-=== Lists ===
-
-- SwNumFormat (subclass of SvxNumFormat) determines the formatting of a single
- numbering level.
-
-- SwNumRule (NOT a subclass of SvxNumRule) is a *list style*, containing one
- SwNumFormat per list level.
- SwNumRule::maTextNodeList is the list of SwTextNode that have this list style
- applied.
-
-- SwNumberTreeNode is a base class that represents an abstract node in a
- hierarchical tree of numbered nodes.
-
-- SwNodeNum is the subclass of SwNumberTreeNode that connects it with an
- actual SwTextNode and also with a SwNumRule;
- SwTextNode::mpNodeNum points back in the other direction
-
-- SwList represents a list, which is (mostly) a vector of SwNodeNum trees,
- one per SwNodes top-level section (why that?).
-
-- IDocumentListsAccess, sw::DocumentListsManager owns all SwList instances,
- and maintains mappings:
- + from list-id to SwList
- + from list style name to SwList (the "default" SwList for that list style)
-
-- IDocumentListItems, sw::DocumentListItemsManager contains a set of all
- SwNodeNum instances, ordered by SwNode index
-
-- the special Outline numbering rule: SwDoc::mpOutlineRule
-
-- IDocumentOutlineNodes, sw::DocumentOutlineNodesManager maintain
- a list (which is actually stored in SwNodes::m_pOutlineNodes) of SwTextNodes
- that either have the Outline numrule applied,
- or have the RES_PARATR_OUTLINELEVEL item set (note that in the latter case,
- the SwTextNode does not have a SwNodeNum and is not associated with the
- SwDoc::mpOutlineRule).
-
-- SwTextNodes and paragraph styles have items/properties:
- + RES_PARATR_OUTLINELEVEL/"OutlineLevel" to specify an outline level without
- necessarily having the outline SwNumRule assigned
- + RES_PARATR_NUMRULE/"NumberingStyleName" the list style to apply; may be
- empty "" which means no list style (to override inherited value)
- Only SwTextNode has these items:
- + RES_PARATR_LIST_ID/"ListId"
- determines the SwList to which the node is added
- + RES_PARATR_LIST_LEVEL/"NumberingLevel"
- the level at which the SwTextNode will appear in the list
- + RES_PARATR_LIST_ISRESTART/"ParaIsNumberingRestart"
- restart numbering sequence at this SwTextNode
- + RES_PARATR_LIST_RESTARTVALUE/"NumberingStartValue"
- restart numbering sequence at this SwTextNode with this value
- + RES_PARATR_LIST_ISCOUNTED/"NumberingIsNumber"
- determines if the node is actually counted in the numbering sequence;
- these are different from "phantoms" because there's still a SwTextNode.
-
-Note that there is no UNO service to represent a list.
-
-=== Layout ===
-
-The layout is a tree of SwFrame subclasses, the following relationships are
-possible between frames:
-
-- You can visit the tree by following the upper, lower, next and previous pointers.
-- The functionality of flowing of a frame across multiple parents (e.g. pages)
- is implemented in SwFlowFrame, which is not an SwFrame subclass. The logical
- chain of such frames can be visited using the follow and precede pointers.
- ("Leaf" is a term that refers to such a relationship.)
-- In case a frame is split into multiple parts, then the first one is called
- master, while the others are called follows.
diff --git a/sw/README.md b/sw/README.md
new file mode 100644
index 000000000000..58a6cc9e1bdb
--- /dev/null
+++ b/sw/README.md
@@ -0,0 +1,211 @@
+# Writer Application Code
+
+Exact history was lost before Sept. 18th, 2000, but old source code
+comments show that Writer core dates back until at least November
+1990.
+
+## Module Contents
+ * `inc`: headers available to all source files inside the module
+ * `qa`: unit, slow and subsequent tests
+ * `sdi`
+ * `source`: see below
+ * `uiconfig`: user interface configuration
+ * `util`: UNO passive registration config
+
+## Source Contents
+ * `core`: Writer core (document model, layout, UNO API implementation)
+ * `filter`: Writer internal filters
+ * `ascii`: plain text filter
+ * `basflt`
+ * `docx`: wrapper for the UNO DOCX import filter (in writerfilter) for autotext purposes
+ * `html`: HTML filter
+ * `inc`: include files for filters
+ * `rtf`: thin copy&paste helper around the UNO RTF import filter (in writerfilter)
+ * `writer`
+ * `ww8`: DOC import, DOC/DOCX/RTF export
+ * `xml`: ODF import/export, subclassed from xmloff (where most of the work is done)
+ * `uibase`: user interface (those parts that are linked into `sw` & always loaded)
+ * `ui`: user interface (optional parts that are loaded on demand (`swui`))
+
+## Core
+
+There is a good overview documentation of basic architecture of Writer core
+in the OOo wiki:
+
+- <https://wiki.openoffice.org/wiki/Writer/Core_And_Layout>
+- <https://wiki.openoffice.org/wiki/Writer/Text_Formatting>
+
+Writer specific WhichIds are defined in `sw/inc/hintids.hxx`.
+
+The details below are mainly about details missing from the wiki pages.
+
+### SwDoc
+
+The central class for a document is `SwDoc`, which represents a document.
+
+A lot of the functionality is split out into separate Manager classes,
+each of which implements some `IDocument*` interface; there are
+`SwDoc::getIDocument*()` methods to retrieve the managers.
+
+However there are still too many members and methods in this class,
+many of which could be moved to some Manager or other...
+
+### SwNodes
+
+Basically a (fancy) array of `SwNode` pointers. There are special subclasses of
+`SwNode` (`SwStartNode` and `SwEndNode`) which are used to encode a nested tree
+structure into the flat array; the range of nodes from `SwStartNode` to its
+corresponding `SwEndNode` is sometimes called a "section" (but is not necessarily
+what the high-level document model calls a "Section"; that is just one of the
+possibilities).
+
+The `SwNodes` contains the following top-level sections:
+
+1. Empty
+2. Footnote content
+3. Frame / Header / Footer content
+4. Deleted Change Tracking content
+5. Body content
+
+### Undo
+
+The Undo/Redo information is stored in a `sw::UndoManager` member of `SwDoc`,
+which implements the `IDocumentUndoRedo` interface.
+Its members include a `SwNodes` array containing the document content that
+is currently not in the actual document but required for Undo/Redo, and
+a stack of `SwUndo` actions, each of which represents one user-visible
+Undo/Redo step.
+
+There are also `ListActions` which internally contain several individual `SwUndo`
+actions; these are created by the StartUndo/EndUndo wrapper methods.
+
+### Text Attributes
+
+The sub-structure of paragraphs is stored in the `SwpHintsArray` member
+`SwTextNode::m_pSwpHints`. There is a base class `SwTextAttr` with numerous
+subclasses; the `SwTextAttr` has a start and end index and a `SfxPoolItem`
+to store the actual formatting attribute.
+
+There are several sub-categories of `SwTextAttr`:
+
+- formatting attributes: Character Styles (`SwTextCharFormat`, `RES_TXTATR_CHARFMT`)
+ and Automatic Styles (no special class, `RES_TXTATR_AUTOFMT`):
+ these are handled by `SwpHintsArray::BuildPortions` and MergePortions,
+ which create non-overlapping portions of formatting attributes.
+
+- nesting attributes: Hyperlinks (`SwTextINetFormat`, `RES_TXTATR_INETFMT`),
+ Ruby (`SwTextRuby`, `RES_TXTATR_CJK_RUBY`) and Meta/MetaField (`SwTextMeta`,
+ `RES_TXTATR_META/RES_TXTATR_METAFIELD`):
+ these maintain a properly nested tree structure.
+ The Meta/Metafield are "special" because they have both start/end
+ and a dummy character at the start.
+
+- misc. attributes: Reference Marks, ToX Marks
+
+- attributes without end: Fields, Footnotes, Flys (`AS_CHAR`)
+ These all have a corresponding dummy character in the paragraph text, which
+ is a placeholder for the "expansion" of the attribute, e.g. field content.
+
+### Fields
+
+There are multiple model classes involved for fields:
+
+- `enum SwFieldIds` enumerates the different types of fields.
+- `SwFieldType` contains some shared stuff for all fields of a type.
+ There are many subclasses of `SwFieldType`, one for each different type
+ of field.
+ For most types of fields there is one shared instance of this per type,
+ which is created in `DocumentFieldsManager::InitFieldTypes()`
+ but for some there are more than one, and they are dynamically created, see
+ `DocumentFieldsManager::InsertFieldType()`. An example for the latter are
+ variable fields (`SwFieldIds::GetExp/SwFieldIds::SetExp`), with one `SwFieldType` per
+ variable.
+- `SwXFieldMaster` is the UNO wrapper of a field type.
+ It is a `SwClient` registered at the `SwFieldType`.
+ Its life-cycle is determined by UNO clients outside of `sw`; it will get
+ disposed when the `SwFieldType` dies.
+- `SwFormatField` is the `SfxPoolItem` of a field.
+ The `SwFormatField` is a `SwClient` registered at its `SwFieldType`.
+ The `SwFormatField` owns the `SwField` of the field.
+- `SwField` contains the core logic of a field.
+ The `SwField` is owned by the `SwFormatField` of the field.
+ There are many subclasses of `SwField`, one for each different type of field.
+ Note that there are not many places that can Expand the field to its
+ correct value, since for example page number fields require a View
+ with an up to date layout; therefore the correct expansion is cached.
+- `SwTextField` is the text attribute of a field.
+ It owns the `SwFormatField` of the field (like all text attributes).
+- `SwXTextField` is the UNO wrapper object of a field.
+ It is a `SwClient` registered at the `SwFormatField`.
+ Its life-cycle is determined by UNO clients outside of `sw`; it will get
+ disposed when the `SwFormatField` dies.
+
+### Lists
+
+- `SwNumFormat` (subclass of `SvxNumFormat`) determines the formatting of a single
+ numbering level.
+
+- `SwNumRule` (NOT a subclass of `SvxNumRule`) is a *list style*, containing one
+ `SwNumFormat` per list level.
+ `SwNumRule::maTextNodeList` is the list of `SwTextNode` that have this list style
+ applied.
+
+- `SwNumberTreeNode` is a base class that represents an abstract node in a
+ hierarchical tree of numbered nodes.
+
+- `SwNodeNum` is the subclass of `SwNumberTreeNode` that connects it with an
+ actual `SwTextNode` and also with a `SwNumRule`;
+ `SwTextNode::mpNodeNum` points back in the other direction
+
+- `SwList` represents a list, which is (mostly) a vector of `SwNodeNum` trees,
+ one per `SwNodes` top-level section (why that?).
+
+- `IDocumentListsAccess`, `sw::DocumentListsManager` owns all `SwList` instances,
+ and maintains mappings:
+ + from list-id to `SwList`
+ + from list style name to `SwList` (the "default" `SwList` for that list style)
+
+- `IDocumentListItems`, `sw::DocumentListItemsManager` contains a set of all
+ `SwNodeNum` instances, ordered by `SwNode` index
+
+- the special Outline numbering rule: `SwDoc::mpOutlineRule`
+
+- `IDocumentOutlineNodes`, `sw::DocumentOutlineNodesManager` maintain
+ a list (which is actually stored in `SwNodes::m_pOutlineNodes`) of `SwTextNodes`
+ that either have the Outline numrule applied,
+ or have the `RES_PARATR_OUTLINELEVEL` item set (note that in the latter case,
+ the `SwTextNode` does not have a `SwNodeNum` and is not associated with the
+ `SwDoc::mpOutlineRule`).
+
+- `SwTextNodes` and paragraph styles have items/properties:
+ + `RES_PARATR_OUTLINELEVEL/"OutlineLevel"` to specify an outline level without
+ necessarily having the outline `SwNumRule` assigned
+ + `RES_PARATR_NUMRULE/"NumberingStyleName"` the list style to apply; may be
+ empty `""` which means no list style (to override inherited value)
+ Only `SwTextNode` has these items:
+ + `RES_PARATR_LIST_ID/"ListId"`
+ determines the `SwList` to which the node is added
+ + `RES_PARATR_LIST_LEVEL/"NumberingLevel"`
+ the level at which the `SwTextNode` will appear in the list
+ + `RES_PARATR_LIST_ISRESTART/"ParaIsNumberingRestart"`
+ restart numbering sequence at this `SwTextNode`
+ + `RES_PARATR_LIST_RESTARTVALUE/"NumberingStartValue"`
+ restart numbering sequence at this `SwTextNode` with this value
+ + `RES_PARATR_LIST_ISCOUNTED/"NumberingIsNumber"`
+ determines if the node is actually counted in the numbering sequence;
+ these are different from `"phantoms"` because there's still a `SwTextNode`.
+
+Note that there is no UNO service to represent a list.
+
+### Layout
+
+The layout is a tree of `SwFrame` subclasses, the following relationships are
+possible between frames:
+
+- You can visit the tree by following the upper, lower, next and previous pointers.
+- The functionality of flowing of a frame across multiple parents (e.g. pages)
+ is implemented in `SwFlowFrame`, which is not an `SwFrame` subclass. The logical
+ chain of such frames can be visited using the follow and precede pointers.
+ ("Leaf" is a term that refers to such a relationship.)
+- In case a frame is split into multiple parts, then the first one is called
+ master, while the others are called follows.
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 70790ca5cdc1..b0b94c9979ff 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -91,7 +91,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/addressblockdialog \
sw/uiconfig/swriter/ui/alreadyexistsdialog \
sw/uiconfig/swriter/ui/addressfragment \
- sw/uiconfig/swriter/ui/annotationmenu \
+ sw/uiconfig/swriter/ui/annotation \
sw/uiconfig/swriter/ui/asciifilterdialog \
sw/uiconfig/swriter/ui/asksearchdialog \
sw/uiconfig/swriter/ui/assignfieldsdialog \
@@ -103,6 +103,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/autotext \
sw/uiconfig/swriter/ui/bibliographyentry \
sw/uiconfig/swriter/ui/bibliofragment \
+ sw/uiconfig/swriter/ui/bookmarkmenu \
sw/uiconfig/swriter/ui/bulletsandnumbering \
sw/uiconfig/swriter/ui/businessdatapage \
sw/uiconfig/swriter/ui/calendar \
@@ -234,10 +235,11 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/notebookbar_groups \
sw/uiconfig/swriter/ui/notebookbar_groupedbar_full \
sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact \
- sw/uiconfig/swriter/ui/pagecolumncontrol \
+ sw/uiconfig/swriter/ui/notebookbar_online \
sw/uiconfig/swriter/ui/pagemargincontrol \
sw/uiconfig/swriter/ui/pageorientationcontrol \
sw/uiconfig/swriter/ui/pagesizecontrol \
+ sw/uiconfig/swriter/ui/pagestylemenu \
sw/uiconfig/swriter/ui/paradialog \
sw/uiconfig/swriter/ui/picturedialog \
sw/uiconfig/swriter/ui/picturepage \
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index d384d200d867..f1ba8a499589 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -23,13 +23,14 @@
#include <basegfx/range/b2drange.hxx>
#include <tools/date.hxx>
#include <tools/time.hxx>
-#include <vcl/builder.hxx>
-#include <vcl/window.hxx>
+#include <vcl/InterimItemWindow.hxx>
+#include <vcl/customweld.hxx>
#include "postithelper.hxx"
#include "swrect.hxx"
#include "SidebarWindowsTypes.hxx"
+class EditView;
class PopupMenu;
class OutlinerParaObject;
class SwPostItMgr;
@@ -53,7 +54,7 @@ namespace sw::sidebarwindows {
namespace sw::annotation {
-class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
+class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public InterimItemWindow
{
public:
SwAnnotationWin( SwEditWin& rEditWin,
@@ -105,7 +106,6 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
Outliner* GetOutliner() { return mpOutliner.get();}
bool HasScrollbar() const;
bool IsScrollbarVisible() const;
- ScrollBar* Scrollbar() { return mpVScrollbar; }
::sw::sidebarwindows::AnchorOverlayObject* Anchor() { return mpAnchor.get();}
::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow.get();}
::sw::overlay::OverlayRanges* TextRange() { return mpTextRangeOverlay.get();}
@@ -128,7 +128,6 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
void ShowAnchorOnly(const Point &aPoint);
void ShowNote();
void HideNote();
- void InvalidateControl();
void ResetAttributes();
@@ -140,7 +139,6 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
}
void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor);
- const Color& ColorAnchor() { return mColorAnchor; }
const Color& ColorDark() { return mColorDark; }
const Color& ColorLight() { return mColorLight; }
void Rescale();
@@ -153,8 +151,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
sal_Int32 GetMetaHeight() const;
sal_Int32 GetMinimumSizeWithMeta() const;
sal_Int32 GetMinimumSizeWithoutMeta() const;
- sal_Int32 GetMetaButtonAreaWidth() const;
- sal_Int32 GetScrollbarWidth() const;
+ int GetPrefScrollbarWidth() const;
sal_Int32 GetNumFields() const;
void SetSpellChecking();
@@ -169,7 +166,6 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
SwPostItHelper::SwLayoutStatus GetLayoutStatus() const { return mLayoutStatus; }
const Color& GetChangeColor() const { return mChangeColor; }
- DECL_LINK( WindowEventListener, VclWindowEvent&, void );
bool IsMouseOverSidebarWin() const { return mbMouseOver; }
void SetLanguage(const SvxLanguageItem& rNewItem);
@@ -177,11 +173,8 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
void ChangeSidebarItem( SwSidebarItem const & rSidebarItem );
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
- virtual void Draw(OutputDevice* pDev, const Point&, DrawFlags) override;
- virtual void KeyInput(const KeyEvent& rKeyEvt) override;
- virtual void MouseButtonDown(const MouseEvent& rMouseEvent) override;
- virtual void MouseButtonUp(const MouseEvent& rMouseEvent) override;
- virtual void MouseMove(const MouseEvent& rMouseEvent) override;
+ void DrawForPage(OutputDevice* pDev, const Point& rPos);
+
void PaintTile(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
/// Is there a matching sub-widget inside this sidebar widget for rPointLogic?
bool IsHitWindow(const Point& rPointLogic);
@@ -209,23 +202,27 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
virtual FactoryFunction GetUITestFactory() const override;
private:
- VclPtr<MenuButton> CreateMenuButton();
+
virtual void LoseFocus() override;
- virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
virtual void GetFocus() override;
void SetSizePixel( const Size& rNewSize ) override;
SfxItemSet DefaultItem();
DECL_LINK(ModifyHdl, LinkParamNone*, void);
- DECL_LINK(ScrollHdl, ScrollBar*, void);
+ DECL_LINK(ScrollHdl, weld::ScrolledWindow&, void);
DECL_LINK(DeleteHdl, void*, void);
+ DECL_LINK(ToggleHdl, weld::ToggleButton&, void);
+ DECL_LINK(SelectHdl, const OString&, void);
+ DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+ DECL_LINK(MouseMoveHdl, const MouseEvent&, bool);
sal_uInt32 CountFollowing();
SvxLanguageItem GetLanguage() const;
- VclBuilder maBuilder;
+ void SetMenuButtonColors();
+
SwPostItMgr& mrMgr;
SwView& mrView;
@@ -234,12 +231,14 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
std::unique_ptr<OutlinerView> mpOutlinerView;
std::unique_ptr<Outliner> mpOutliner;
- VclPtr<sw::sidebarwindows::SidebarTextControl> mpSidebarTextControl;
- VclPtr<ScrollBar> mpVScrollbar;
- VclPtr<FixedText> mpMetadataAuthor;
- VclPtr<FixedText> mpMetadataDate;
- VclPtr<FixedText> mpMetadataResolved;
- VclPtr<MenuButton> mpMenuButton;
+ std::unique_ptr<weld::ScrolledWindow> mxVScrollbar;
+ std::unique_ptr<sw::sidebarwindows::SidebarTextControl> mxSidebarTextControl;
+ std::unique_ptr<weld::CustomWeld> mxSidebarTextControlWin;
+ vcl::Font maLabelFont;
+ std::unique_ptr<weld::Label> mxMetadataAuthor;
+ std::unique_ptr<weld::Label> mxMetadataDate;
+ std::unique_ptr<weld::Label> mxMetadataResolved;
+ std::unique_ptr<weld::MenuButton> mxMenuButton;
std::unique_ptr<sw::sidebarwindows::AnchorOverlayObject> mpAnchor;
std::unique_ptr<sw::sidebarwindows::ShadowOverlayObject> mpShadow;
@@ -272,7 +271,6 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
SwFormatField* mpFormatField;
SwPostItField* mpField;
- VclPtr<PopupMenu> mpButtonPopup;
};
} // end of namespace sw::annotation
diff --git a/sw/inc/BorderCacheOwner.hxx b/sw/inc/BorderCacheOwner.hxx
new file mode 100644
index 000000000000..6819aed3a8ca
--- /dev/null
+++ b/sw/inc/BorderCacheOwner.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#ifndef INCLUDED_SW_INC_CACHEOWNER_HXX
+#define INCLUDED_SW_INC_CACHEOWNER_HXX
+
+#include <sal/types.h>
+#include "swdllapi.h"
+
+class SwBorderAttrs;
+class SwBorderAttrAccess;
+
+namespace sw
+{
+/// Bookkeeping helper for SwCache caching writer borders.
+class SW_DLLPUBLIC BorderCacheOwner
+{
+private:
+ friend SwBorderAttrs;
+ friend SwBorderAttrAccess;
+ bool m_bInCache;
+
+public:
+ BorderCacheOwner()
+ : m_bInCache(false)
+ {
+ }
+ BorderCacheOwner(BorderCacheOwner&)
+ : m_bInCache(false)
+ {
+ }
+ BorderCacheOwner& operator=(const BorderCacheOwner&)
+ {
+ m_bInCache = false;
+ return *this;
+ }
+ ~BorderCacheOwner();
+ bool IsInCache() const { return m_bInCache; }
+ void InvalidateInSwCache(const sal_uInt16);
+};
+}
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx
index 8273cf29ad85..eb813773abb3 100644
--- a/sw/inc/EnhancedPDFExportHelper.hxx
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -219,6 +219,10 @@ class SwEnhancedPDFExportHelper
static LanguageType s_eLanguageDefault;
void EnhancedPDFExport();
+
+ /// Exports bibliography entry links.
+ void ExportAuthorityEntryLinks();
+
sal_Int32 CalcOutputPageNum( const SwRect& rRect ) const;
std::vector< sal_Int32 > CalcOutputPageNums( const SwRect& rRect ) const;
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
index 1ad39701d02b..e678f52605ff 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -341,6 +341,14 @@ class IDocumentMarkAccess
virtual sal_Int32 getAnnotationMarksCount() const = 0;
virtual const_iterator_t findAnnotationMark( const OUString& rName ) const = 0;
virtual sw::mark::IMark* getAnnotationMarkFor(const SwPosition& rPosition) const = 0;
+ // handle and restore text ranges of annotations of tracked deletions
+ // based on the helper bookmarks (which can survive I/O and hiding redlines)
+ virtual ::sw::mark::IMark* makeAnnotationBookmark(const SwPaM& rPaM,
+ const OUString& rProposedName,
+ MarkType eMark, ::sw::mark::InsertMode eMode,
+ SwPosition const* pSepPos = nullptr) = 0;
+ virtual const_iterator_t findAnnotationBookmark( const OUString& rName ) const = 0;
+ virtual void restoreAnnotationMarks(bool bDelete = true) = 0;
/** Finds the first mark that is starting after.
@returns
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
index 8273954f4a71..059694ff1ceb 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -112,6 +112,7 @@ enum class DocumentSettingId
PROTECT_FIELDS,
HEADER_SPACING_BELOW_LAST_PARA,
FRAME_AUTOWIDTH_WITH_MORE_PARA,
+ GUTTER_AT_TOP,
};
/** Provides access to settings of a document
diff --git a/sw/inc/SwSmartTagMgr.hxx b/sw/inc/SwSmartTagMgr.hxx
index e6d60c530f84..f1c254f93e45 100644
--- a/sw/inc/SwSmartTagMgr.hxx
+++ b/sw/inc/SwSmartTagMgr.hxx
@@ -21,12 +21,13 @@
#define INCLUDED_SW_INC_SWSMARTTAGMGR_HXX
#include <svx/SmartTagMgr.hxx>
+#include <rtl/ref.hxx>
// Wrapper for the svx SmartTagMgr
class SwSmartTagMgr final : public SmartTagMgr
{
private:
- static SwSmartTagMgr* spTheSwSmartTagMgr;
+ static rtl::Reference<SwSmartTagMgr> spTheSwSmartTagMgr;
SwSmartTagMgr(const OUString& rModuleName);
virtual ~SwSmartTagMgr() override;
diff --git a/sw/inc/ToxLinkProcessor.hxx b/sw/inc/ToxLinkProcessor.hxx
index e53c537b758e..77307cf6b784 100644
--- a/sw/inc/ToxLinkProcessor.hxx
+++ b/sw/inc/ToxLinkProcessor.hxx
@@ -41,7 +41,7 @@ public:
* STR_POOLCHR_TOXJUMP.
*/
void
- CloseLink(sal_Int32 endPosition, const OUString& url);
+ CloseLink(sal_Int32 endPosition, const OUString& url, bool bRelative);
/** Insert the found links as attributes to a text node */
void
diff --git a/sw/inc/ToxTextGenerator.hxx b/sw/inc/ToxTextGenerator.hxx
index 675835573266..d3a7e9177db0 100644
--- a/sw/inc/ToxTextGenerator.hxx
+++ b/sw/inc/ToxTextGenerator.hxx
@@ -27,6 +27,7 @@
#include <memory>
#include <vector>
+#include <unordered_map>
class SfxItemSet;
class SwAttrPool;
@@ -67,7 +68,9 @@ public:
* process @p numberOfEntriesToProcess entries.
*/
void
- GenerateText(SwDoc *doc, const std::vector<std::unique_ptr<SwTOXSortTabBase>>& entries,
+ GenerateText(SwDoc *doc,
+ std::unordered_map<OUString, int> & rMarkURLs,
+ const std::vector<std::unique_ptr<SwTOXSortTabBase>>& entries,
sal_uInt16 indexOfEntryToProcess, sal_uInt16 numberOfEntriesToProcess,
SwRootFrame const* pLayout);
diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx
index bd74d6ea479a..eb457701a98d 100644
--- a/sw/inc/anchoreddrawobject.hxx
+++ b/sw/inc/anchoreddrawobject.hxx
@@ -94,6 +94,7 @@ class SwAnchoredDrawObject final : public SwAnchoredObject
page frame
*/
virtual void RegisterAtCorrectPage() override;
+ virtual void RegisterAtPage(SwPageFrame &) override;
virtual bool SetObjTop_( const SwTwips _nTop) override;
virtual bool SetObjLeft_( const SwTwips _nLeft) override;
diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
index 5309602f9ef0..fa789d755d53 100644
--- a/sw/inc/anchoredobject.hxx
+++ b/sw/inc/anchoredobject.hxx
@@ -295,6 +295,8 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to invalidate position of the anchored object */
virtual void InvalidateObjPos() = 0;
+ virtual void RegisterAtPage(SwPageFrame &) = 0;
+
/** method to perform necessary invalidations for the positioning of
objects, for whose the wrapping style influence has to be considered
on the object positioning.
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 6ea5612f3164..681f95eddc31 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -29,6 +29,9 @@
#include <memory>
#include <vector>
+class SwTOXInternational;
+class SwTextAttr;
+
class SwAuthEntry final : public salhelper::SimpleReferenceObject
{
friend class SwAuthorityFieldType;
@@ -41,6 +44,7 @@ public:
inline OUString const & GetAuthorField(ToxAuthorityField ePos) const;
inline void SetAuthorField(ToxAuthorityField ePos,
const OUString& rField);
+ void dumpAsXml(xmlTextWriterPtr pWriter) const;
};
struct SwTOXSortKey
@@ -98,6 +102,7 @@ public:
sal_uInt16 AppendField(const SwAuthEntry& rInsert);
sal_uInt16 GetSequencePos(const SwAuthEntry* pAuthEntry, SwRootFrame const* pLayout);
+ std::unique_ptr<SwTOXInternational> CreateTOXInternational() const;
bool IsSequence() const {return m_bIsSequence;}
void SetSequence(bool bSet)
@@ -145,7 +150,7 @@ public:
one of the instances with the same m_nHandle is actually in the document,
they're all cloned via CopyField()...
*/
-class SAL_DLLPUBLIC_RTTI SwAuthorityField final : public SwField
+class SW_DLLPUBLIC SwAuthorityField final : public SwField
{
rtl::Reference<SwAuthEntry> m_xAuthEntry;
mutable sal_IntPtr m_nTempSequencePos;
@@ -159,7 +164,7 @@ public:
OUString ConditionalExpandAuthIdentifier(SwRootFrame const* pLayout) const;
//To handle Citation
- SW_DLLPUBLIC OUString ExpandCitation(ToxAuthorityField eField, SwRootFrame const* pLayout) const;
+ OUString ExpandCitation(ToxAuthorityField eField, SwRootFrame const* pLayout) const;
SwAuthorityField(SwAuthorityFieldType* pType, const OUString& rFieldContents);
SwAuthorityField(SwAuthorityFieldType* pType, SwAuthEntry* pAuthEntry);
@@ -176,6 +181,14 @@ public:
SwAuthEntry* GetAuthEntry() const { return m_xAuthEntry.get(); }
virtual OUString GetDescription() const override;
+
+ /// Returns the line matching the source's default row in the ToX.
+ OUString GetAuthority(const SwTextAttr* pTextAttr, const SwRootFrame* pLayout) const;
+
+ bool HasURL() const;
+ OUString GetAbsoluteURL() const;
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
inline OUString const & SwAuthEntry::GetAuthorField(ToxAuthorityField ePos) const
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index b5b6ff9a3e30..11a62033c5cc 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -176,8 +176,7 @@ class SW_DLLPUBLIC SwModify: public SwClient
friend void sw::ClientNotifyAttrChg(SwModify&, const SwAttrSet&, SwAttrSet&, SwAttrSet&);
template<typename E, typename S, sw::IteratorMode> friend class SwIterator;
sw::WriterListener* m_pWriterListeners; // the start of the linked list of clients
- bool m_bModifyLocked : 1; // don't broadcast changes now
- bool m_bInCache : 1;
+ bool m_bModifyLocked; // don't broadcast changes now
SwModify(SwModify const &) = delete;
SwModify &operator =(const SwModify&) = delete;
@@ -185,7 +184,7 @@ protected:
virtual void SwClientNotify(const SwModify&, const SfxHint& rHint) override;
public:
SwModify()
- : SwClient(), m_pWriterListeners(nullptr), m_bModifyLocked(false), m_bInCache(false)
+ : SwClient(), m_pWriterListeners(nullptr), m_bModifyLocked(false)
{}
// broadcasting mechanism
@@ -196,19 +195,14 @@ public:
void Add(SwClient *pDepend);
SwClient* Remove(SwClient *pDepend);
bool HasWriterListeners() const { return m_pWriterListeners; }
+ bool HasOnlyOneListener() const { return m_pWriterListeners && m_pWriterListeners->IsLast(); }
// get information about attribute
virtual bool GetInfo( SfxPoolItem& ) const override;
void LockModify() { m_bModifyLocked = true; }
void UnlockModify() { m_bModifyLocked = false; }
- void SetInCache( bool bNew ) { m_bInCache = bNew; }
- void SetInDocDTOR();
bool IsModifyLocked() const { return m_bModifyLocked; }
- bool IsInCache() const { return m_bInCache; }
-
- void CheckCaching( const sal_uInt16 nWhich );
- bool HasOnlyOneListener() const { return m_pWriterListeners && m_pWriterListeners->IsLast(); }
};
template<typename TElementType, typename TSource, sw::IteratorMode eMode> class SwIterator;
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 4634a5697d61..3b8194f52ec4 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -394,10 +394,8 @@
#define FN_TABLE_HEADLINE_COUNT (FN_FORMAT + 147) /* number of repeated headlines of tables */
// Region: Ribbon
-#define FN_FORMULA_CALC (FN_FORMAT + 156) /* select formula */
-#define FN_FORMULA_CANCEL (FN_FORMAT + 157) /* don't apply formula */
-#define FN_FORMULA_APPLY (FN_FORMAT + 158) /* apply formula */
#define FN_TABLE_UNSET_READ_ONLY (FN_FORMAT + 159) /* undo cell protection for table */
+// 156..158 are toolbox item ids
#define FN_FRAME_WRAP_IDEAL (FN_FORMAT + 162) /* frame ideal wrapping */
#define FN_FRAME_WRAPTHRU_TOGGLE (FN_FORMAT + 163) /* toggle frame transparent wrapping */
@@ -728,6 +726,7 @@
#define FN_TO_NEXT_PAGE (FN_SELECTION + 95)
#define FN_TO_PREV_PAGE (FN_SELECTION + 96)
+#define FN_SELECTION_CYCLE (FN_SELECTION + 97)
// QUERY-Block
#define FN_TXTATR_INET (FN_QUERY +29) /* INet-Attribute */
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 2fbb94509c6e..5b7e71a23634 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -341,7 +341,7 @@ public:
// start parenthesing, hide SV-Cursor and selected areas
void StartAction();
// end parenthesing, show SV-Cursor and selected areas
- void EndAction( const bool bIdleEnd = false, const bool DoSetPosX = false );
+ void EndAction( const bool bIdleEnd = false );
// basic cursor travelling
tools::Long GetUpDownX() const { return m_nUpDownX; }
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 07114eedf59d..c596a61e4980 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -170,7 +170,7 @@ public:
};
/** ContactObject for connection between frames (or their formats respectively)
- in SwClient and the drawobjects of Drawing (DsrObjUserCall). */
+ in SwClient and the drawobjects of Drawing (SdrObjUserCall). */
class SW_DLLPUBLIC SwFlyDrawContact final : public SwContact
{
@@ -179,13 +179,13 @@ private:
SwFlyDrawObjPtr mpMasterObj;
void SwClientNotify(const SwModify&, const SfxHint& rHint) override;
- sal_uInt32 GetOrdNumForNewRef(const SwFlyFrame* pFly);
+ sal_uInt32 GetOrdNumForNewRef(const SwFlyFrame* pFly, SwFrame const& rAnchorFrame);
public:
/// Creates DrawObject and registers it with the Model.
SwFlyDrawContact(SwFlyFrameFormat* pToRegisterIn, SdrModel& rTargetModel);
- static SwVirtFlyDrawObj* CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFormat* pFormat);
+ static SwVirtFlyDrawObj* CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFormat* pFormat, SwFrame const& rAnchorFrame);
virtual ~SwFlyDrawContact() override;
virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const override;
@@ -206,7 +206,9 @@ public:
};
/** new class for re-direct methods calls at a 'virtual'
- drawing object to its referenced object. */
+ drawing object to its referenced object.
+ For example, if an SdrObject is anchored in a header, then later pages will have a SwDrawVirtObj
+ in later headers. */
class SwDrawVirtObj final : public SdrVirtObj
{
private:
@@ -233,12 +235,13 @@ class SwDrawVirtObj final : public SdrVirtObj
SdrModel& rSdrModel,
SdrObject& _rNewObj,
SwDrawContact& _rDrawContact);
+ // copy constructor
+ SwDrawVirtObj(SdrModel& rSdrModel, SwDrawVirtObj const & rSource);
/// access to offset
virtual Point GetOffset() const override;
virtual SwDrawVirtObj* CloneSdrObject(SdrModel& rTargetModel) const override;
- SwDrawVirtObj& operator= (const SwDrawVirtObj& rObj);
/// connection to writer layout
const SwAnchoredObject& GetAnchoredObj() const { return maAnchoredDrawObj; }
@@ -248,7 +251,7 @@ class SwDrawVirtObj final : public SdrVirtObj
void RemoveFromWriterLayout();
/// connection to drawing layer
- void AddToDrawingPage();
+ void AddToDrawingPage(SwFrame const& rAnchorFrame);
void RemoveFromDrawingPage();
/** is 'virtual' drawing object connected to writer layout and
@@ -398,7 +401,7 @@ class SAL_DLLPUBLIC_RTTI SwDrawContact final : public SwContact
/// Moves all SW-connections to new Master)
void ChangeMasterObject( SdrObject *pNewMaster );
- SwDrawVirtObj* AddVirtObj();
+ SwDrawVirtObj* AddVirtObj(SwFrame const& rAnchorFrame);
void NotifyBackgrdOfAllVirtObjs( const tools::Rectangle* pOldBoundRect );
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 987f660960c2..287450821fc4 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -21,6 +21,7 @@
// SwDoc interfaces
#include <o3tl/deleter.hxx>
+#include <o3tl/typed_flags_set.hxx>
#include <o3tl/sorted_vector.hxx>
#include <vcl/idle.hxx>
#include "swdllapi.h"
@@ -676,7 +677,6 @@ public:
void ChgDBData( const SwDBData& rNewData );
SwDBData const & GetDBData();
- const SwDBData& GetDBDesc();
// Some helper functions
OUString GetUniqueGrfName() const;
@@ -1196,7 +1196,8 @@ public:
sal_uInt16 nCnt = 1, bool bBehind = true );
// Delete Columns/Rows in table.
- bool DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn = false );
+ enum class RowColMode { DeleteRow = 0, DeleteColumn = 1, DeleteProtected = 2 };
+ bool DeleteRowCol(const SwSelBoxes& rBoxes, RowColMode eMode = RowColMode::DeleteRow);
void DeleteRow( const SwCursor& rCursor );
void DeleteCol( const SwCursor& rCursor );
@@ -1668,6 +1669,10 @@ private:
};
+namespace o3tl {
+ template<> struct typed_flags<SwDoc::RowColMode> : is_typed_flags<SwDoc::RowColMode, 3> {};
+}
+
// This method is called in Dtor of SwDoc and deletes cache of ContourObjects.
void ClrContourCache();
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 30f176bf0633..3ac7b308315d 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -197,8 +197,8 @@ class SwDocStyleSheetPool : public SfxStyleSheetBasePool
SwDoc& rDoc;
bool bOrganizer : 1; ///< Organizer
- virtual SfxStyleSheetBase* Create( const OUString&, SfxStyleFamily, SfxStyleSearchBits nMask) override;
- virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& ) override;
+ virtual rtl::Reference<SfxStyleSheetBase> Create( const OUString&, SfxStyleFamily, SfxStyleSearchBits nMask) override;
+ virtual rtl::Reference<SfxStyleSheetBase> Create( const SfxStyleSheetBase& ) override;
using SfxStyleSheetBasePool::Find;
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
index f144663ebac9..2f06a9c8d0fc 100644
--- a/sw/inc/dpage.hxx
+++ b/sw/inc/dpage.hxx
@@ -39,7 +39,7 @@ public:
explicit SwDPage(SwDrawModel& rNewModel, bool bMasterPage);
virtual ~SwDPage() override;
- virtual SwDPage* CloneSdrPage(SdrModel& rTargetModel) const override;
+ virtual rtl::Reference<SdrPage> CloneSdrPage(SdrModel& rTargetModel) const override;
// #i3694#
// This GetOffset() method is not needed anymore, it even leads to errors.
diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx
index 05762bb577ae..d80be90bc220 100644
--- a/sw/inc/drawdoc.hxx
+++ b/sw/inc/drawdoc.hxx
@@ -37,7 +37,7 @@ public:
/// Put needed items for XPropertyList entries from the DrawModel.
void PutAreaListItems(SfxItemSet& rSet) const;
- virtual SdrPage* AllocPage(bool bMasterPage) override;
+ virtual rtl::Reference<SdrPage> AllocPage(bool bMasterPage) override;
virtual css::uno::Reference<css::embed::XStorage> GetDocumentStorage() const override;
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index a68ccce143f1..c5f5be3c34c7 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -415,7 +415,6 @@ public:
/// Database information.
SwDBData const & GetDBData() const;
- const SwDBData& GetDBDesc() const;
void ChgDBData(const SwDBData& SwDBData);
void ChangeDBFields( const std::vector<OUString>& rOldNames,
const OUString& rNewName );
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 95eb809aebfa..f142270ddc40 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -468,7 +468,6 @@ public:
OUString GetUniqueGrfName() const;
OUString GetUniqueOLEName() const;
OUString GetUniqueFrameName() const;
- OUString GetUniqueShapeName() const;
/// Jump to named Fly (graphic/OLE).
bool GotoFly( const OUString& rName, FlyCntType eType,
@@ -536,7 +535,7 @@ public:
bool IsDrawCreate() const;
void CreateDefaultShape(SdrObjKind eSdrObjectKind, const tools::Rectangle& rRect, sal_uInt16 nSlotId);
- /// Functions for Rubberbox, ti select Draw-Objects
+ /// Functions for Rubberbox, it selects Draw-Objects
bool BeginMark( const Point &rPos );
void MoveMark ( const Point &rPos );
bool EndMark ();
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 5c13eece54ea..e38122ec390d 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -261,7 +261,7 @@ public:
m_wXFieldMaster = xFieldMaster;
}
- static OUString GetTypeStr( SwFieldTypesEnum nTypeId );
+ static const OUString & GetTypeStr( SwFieldTypesEnum nTypeId );
/// Only in derived classes.
virtual OUString GetName() const;
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx
index 07f157f13bf2..10a41b9d9b78 100644
--- a/sw/inc/fmtcol.hxx
+++ b/sw/inc/fmtcol.hxx
@@ -66,6 +66,8 @@ class SW_DLLPUBLIC SwTextFormatColl
bool mbAssignedToOutlineStyle;
+ bool m_bInSwFntCache;
+
SwTextFormatColl *mpNextTextFormatColl;
protected:
@@ -75,6 +77,7 @@ protected:
: SwFormatColl(rPool, pFormatCollName, aTextFormatCollSetRange, pDerFrom, nFormatWh)
, mbStayAssignedToListLevelOfOutlineStyle(false)
, mbAssignedToOutlineStyle(false)
+ , m_bInSwFntCache(false)
{
mpNextTextFormatColl = this;
}
@@ -85,6 +88,7 @@ protected:
: SwFormatColl(rPool, rFormatCollName, aTextFormatCollSetRange, pDerFrom, nFormatWh)
, mbStayAssignedToListLevelOfOutlineStyle(false)
, mbAssignedToOutlineStyle(false)
+ , m_bInSwFntCache(false)
{
mpNextTextFormatColl = this;
}
@@ -93,6 +97,7 @@ protected:
virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
public:
+ virtual ~SwTextFormatColl();
inline void SetNextTextFormatColl(SwTextFormatColl& rNext);
SwTextFormatColl& GetNextTextFormatColl() const { return *mpNextTextFormatColl; }
@@ -138,6 +143,25 @@ public:
if(HasWriterListeners() && !IsModifyLocked())
CallSwClientNotify(sw::LegacyModifyHint(&rDrop, &rDrop));
};
+ bool IsInSwFntCache() const { return m_bInSwFntCache; };
+ void SetInSwFntCache() { m_bInSwFntCache = true; };
+ virtual void InvalidateInSwFntCache(sal_uInt16 nWhich) override
+ {
+ if(isCHRATR(nWhich))
+ {
+ m_bInSwFntCache = false;
+ }
+ else
+ {
+ switch(nWhich)
+ {
+ case RES_OBJECTDYING:
+ case RES_FMT_CHG:
+ case RES_ATTRSET_CHG:
+ m_bInSwFntCache = false;
+ }
+ }
+ };
};
class SwGrfFormatColl final : public SwFormatColl
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index 96e03b342eec..c3d2aec20773 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -20,9 +20,11 @@
#define INCLUDED_SW_INC_FORMAT_HXX
#include "swdllapi.h"
-#include "swatrset.hxx"
+
+#include "BorderCacheOwner.hxx"
#include "calbck.hxx"
#include "hintids.hxx"
+#include "swatrset.hxx"
#include <memory>
class IDocumentSettingAccess;
@@ -41,7 +43,7 @@ namespace drawinglayer::attribute {
}
/// Base class for various Writer styles.
-class SW_DLLPUBLIC SwFormat : public sw::BroadcastingModify
+class SW_DLLPUBLIC SwFormat : public sw::BorderCacheOwner, public sw::BroadcastingModify
{
friend class SwFrameFormat;
@@ -60,25 +62,8 @@ class SW_DLLPUBLIC SwFormat : public sw::BroadcastingModify
bool m_bAutoUpdateFormat : 1;/**< TRUE: Set attributes of a whole paragraph
at format (UI-side!). */
bool m_bHidden : 1;
- bool m_bInSwFntCache : 1;
std::shared_ptr<SfxGrabBagItem> m_pGrabBagItem; ///< Style InteropGrabBag.
- void InvalidateInSwFntCache(sal_uInt16 nWhich)
- {
- if(isCHRATR(nWhich))
- {
- m_bInSwFntCache = false;
- }
- else
- {
- switch(nWhich)
- {
- case RES_OBJECTDYING:
- case RES_FMT_CHG:
- case RES_ATTRSET_CHG:
- m_bInSwFntCache = false;
- }
- }
- };
+ virtual void InvalidateInSwFntCache(sal_uInt16) {};
protected:
SwFormat( SwAttrPool& rPool, const char* pFormatNm,
@@ -95,8 +80,6 @@ public:
/// for Querying of Writer-functions.
sal_uInt16 Which() const { return m_nWhichId; };
- bool IsInSwFntCache() const { return m_bInSwFntCache; };
- void SetInSwFntCache() { m_bInSwFntCache = true; };
/// Copy attributes even among documents.
void CopyAttrs( const SwFormat& );
@@ -258,6 +241,8 @@ public:
inline const SwTableBoxFormula &GetTableBoxFormula( bool = true ) const;
inline const SwTableBoxValue &GetTableBoxValue( bool = true ) const;
+ void SetPageFormatToDefault();
+
/** SwFormat::IsBackgroundTransparent
Virtual method to determine, if background of format is transparent.
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 3971619e27e1..66ecb9fb27e8 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -361,84 +361,86 @@ constexpr TypedWhichId<SfxStringItem> RES_FRMATR_STYLE_NAME(127);
constexpr TypedWhichId<SfxStringItem> RES_FRMATR_CONDITIONAL_STYLE_NAME(128);
constexpr TypedWhichId<SfxGrabBagItem> RES_FRMATR_GRABBAG(129);
constexpr TypedWhichId<SdrTextVertAdjustItem> RES_TEXT_VERT_ADJUST(130);
-constexpr sal_uInt16 RES_FRMATR_END(131);
+constexpr TypedWhichId<SfxBoolItem> RES_BACKGROUND_FULL_SIZE(131);
+constexpr TypedWhichId<SfxBoolItem> RES_RTL_GUTTER(132);
+constexpr sal_uInt16 RES_FRMATR_END(133);
constexpr sal_uInt16 RES_GRFATR_BEGIN(RES_FRMATR_END);
-constexpr TypedWhichId<SwMirrorGrf> RES_GRFATR_MIRRORGRF(RES_GRFATR_BEGIN); // 131
-constexpr TypedWhichId<SwCropGrf> RES_GRFATR_CROPGRF(132);
-
-constexpr TypedWhichId<SwRotationGrf> RES_GRFATR_ROTATION(133);
-constexpr TypedWhichId<SwLuminanceGrf> RES_GRFATR_LUMINANCE(134);
-constexpr TypedWhichId<SwContrastGrf> RES_GRFATR_CONTRAST(135);
-constexpr TypedWhichId<SwChannelRGrf> RES_GRFATR_CHANNELR(136);
-constexpr TypedWhichId<SwChannelGGrf> RES_GRFATR_CHANNELG(137);
-constexpr TypedWhichId<SwChannelBGrf> RES_GRFATR_CHANNELB(138);
-constexpr TypedWhichId<SwGammaGrf> RES_GRFATR_GAMMA(139);
-constexpr TypedWhichId<SwInvertGrf> RES_GRFATR_INVERT(140);
-constexpr TypedWhichId<SwTransparencyGrf> RES_GRFATR_TRANSPARENCY(141);
-constexpr TypedWhichId<SwDrawModeGrf> RES_GRFATR_DRAWMODE(142);
-
-constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY1(143);
-constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY2(144);
-constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY3(145);
-constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY4(146);
-constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY5(147);
-constexpr sal_uInt16 RES_GRFATR_END(148);
+constexpr TypedWhichId<SwMirrorGrf> RES_GRFATR_MIRRORGRF(RES_GRFATR_BEGIN); // 133
+constexpr TypedWhichId<SwCropGrf> RES_GRFATR_CROPGRF(134);
+
+constexpr TypedWhichId<SwRotationGrf> RES_GRFATR_ROTATION(135);
+constexpr TypedWhichId<SwLuminanceGrf> RES_GRFATR_LUMINANCE(136);
+constexpr TypedWhichId<SwContrastGrf> RES_GRFATR_CONTRAST(137);
+constexpr TypedWhichId<SwChannelRGrf> RES_GRFATR_CHANNELR(138);
+constexpr TypedWhichId<SwChannelGGrf> RES_GRFATR_CHANNELG(139);
+constexpr TypedWhichId<SwChannelBGrf> RES_GRFATR_CHANNELB(140);
+constexpr TypedWhichId<SwGammaGrf> RES_GRFATR_GAMMA(141);
+constexpr TypedWhichId<SwInvertGrf> RES_GRFATR_INVERT(142);
+constexpr TypedWhichId<SwTransparencyGrf> RES_GRFATR_TRANSPARENCY(143);
+constexpr TypedWhichId<SwDrawModeGrf> RES_GRFATR_DRAWMODE(144);
+
+constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY1(145);
+constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY2(146);
+constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY3(147);
+constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY4(148);
+constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY5(149);
+constexpr sal_uInt16 RES_GRFATR_END(150);
constexpr sal_uInt16 RES_BOXATR_BEGIN(RES_GRFATR_END);
-constexpr TypedWhichId<SwTableBoxNumFormat> RES_BOXATR_FORMAT(RES_BOXATR_BEGIN); // 148
-constexpr TypedWhichId<SwTableBoxFormula> RES_BOXATR_FORMULA(149);
-constexpr TypedWhichId<SwTableBoxValue> RES_BOXATR_VALUE(150);
-constexpr sal_uInt16 RES_BOXATR_END(151);
+constexpr TypedWhichId<SwTableBoxNumFormat> RES_BOXATR_FORMAT(RES_BOXATR_BEGIN); // 150
+constexpr TypedWhichId<SwTableBoxFormula> RES_BOXATR_FORMULA(151);
+constexpr TypedWhichId<SwTableBoxValue> RES_BOXATR_VALUE(152);
+constexpr sal_uInt16 RES_BOXATR_END(153);
constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END);
constexpr TypedWhichId<SvXMLAttrContainerItem>
- RES_UNKNOWNATR_CONTAINER(RES_UNKNOWNATR_BEGIN); // 151
-constexpr sal_uInt16 RES_UNKNOWNATR_END(152);
+ RES_UNKNOWNATR_CONTAINER(RES_UNKNOWNATR_BEGIN); // 153
+constexpr sal_uInt16 RES_UNKNOWNATR_END(154);
constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END);
// Format IDs
constexpr sal_uInt16 RES_FMT_BEGIN(RES_UNKNOWNATR_END);
-constexpr TypedWhichId<SwCharFormat> RES_CHRFMT(RES_FMT_BEGIN); // 152
-constexpr TypedWhichId<SwFrameFormat> RES_FRMFMT(153);
-constexpr TypedWhichId<SwFlyFrameFormat> RES_FLYFRMFMT(154);
-constexpr TypedWhichId<SwTextFormatColl> RES_TXTFMTCOLL(155);
-constexpr TypedWhichId<SwGrfFormatColl> RES_GRFFMTCOLL(156);
-constexpr TypedWhichId<SwDrawFrameFormat> RES_DRAWFRMFMT(157);
-constexpr TypedWhichId<SwConditionTextFormatColl> RES_CONDTXTFMTCOLL(158);
-constexpr sal_uInt16 RES_FMT_END(159);
+constexpr TypedWhichId<SwCharFormat> RES_CHRFMT(RES_FMT_BEGIN); // 154
+constexpr TypedWhichId<SwFrameFormat> RES_FRMFMT(155);
+constexpr TypedWhichId<SwFlyFrameFormat> RES_FLYFRMFMT(156);
+constexpr TypedWhichId<SwTextFormatColl> RES_TXTFMTCOLL(157);
+constexpr TypedWhichId<SwGrfFormatColl> RES_GRFFMTCOLL(158);
+constexpr TypedWhichId<SwDrawFrameFormat> RES_DRAWFRMFMT(159);
+constexpr TypedWhichId<SwConditionTextFormatColl> RES_CONDTXTFMTCOLL(160);
+constexpr sal_uInt16 RES_FMT_END(161);
// ID's for Messages in the Formats
constexpr sal_uInt16 RES_MSG_BEGIN(RES_FMT_END);
-constexpr TypedWhichId<SwPtrMsgPoolItem> RES_OBJECTDYING(RES_MSG_BEGIN); // 159
-constexpr TypedWhichId<SwFormatChg> RES_FMT_CHG(160);
-constexpr TypedWhichId<SwAttrSetChg> RES_ATTRSET_CHG(161);
-constexpr TypedWhichId<SwInsText> RES_INS_TXT(162);
-constexpr TypedWhichId<SwDelChr> RES_DEL_CHR(163);
-constexpr TypedWhichId<SwDelText> RES_DEL_TXT(164);
-constexpr TypedWhichId<SwUpdateAttr> RES_UPDATE_ATTR(165);
-constexpr TypedWhichId<SwRefMarkFieldUpdate> RES_REFMARKFLD_UPDATE(166);
-constexpr TypedWhichId<SwDocPosUpdate> RES_DOCPOS_UPDATE(167);
-constexpr TypedWhichId<SwTableFormulaUpdate> RES_TABLEFML_UPDATE(168);
-constexpr TypedWhichId<SwMsgPoolItem> RES_UPDATEDDETBL(169);
-constexpr TypedWhichId<SwMsgPoolItem> RES_TBLHEADLINECHG(170);
-constexpr TypedWhichId<SwAutoFormatGetDocNode> RES_AUTOFMT_DOCNODE(171);
-constexpr TypedWhichId<SwMsgPoolItem> RES_SECTION_HIDDEN(172);
-constexpr TypedWhichId<SwMsgPoolItem> RES_SECTION_NOT_HIDDEN(173);
-constexpr TypedWhichId<SwMsgPoolItem> RES_GRAPHIC_PIECE_ARRIVED(175);
-constexpr TypedWhichId<SwMsgPoolItem> RES_HIDDENPARA_PRINT(176);
-constexpr TypedWhichId<SwVirtPageNumInfo> RES_VIRTPAGENUM_INFO(178);
-constexpr TypedWhichId<SwPtrMsgPoolItem> RES_REMOVE_UNO_OBJECT(179);
+constexpr TypedWhichId<SwPtrMsgPoolItem> RES_OBJECTDYING(RES_MSG_BEGIN); // 161
+constexpr TypedWhichId<SwFormatChg> RES_FMT_CHG(162);
+constexpr TypedWhichId<SwAttrSetChg> RES_ATTRSET_CHG(163);
+constexpr TypedWhichId<SwInsText> RES_INS_TXT(164);
+constexpr TypedWhichId<SwDelChr> RES_DEL_CHR(165);
+constexpr TypedWhichId<SwDelText> RES_DEL_TXT(166);
+constexpr TypedWhichId<SwUpdateAttr> RES_UPDATE_ATTR(167);
+constexpr TypedWhichId<SwRefMarkFieldUpdate> RES_REFMARKFLD_UPDATE(168);
+constexpr TypedWhichId<SwDocPosUpdate> RES_DOCPOS_UPDATE(169);
+constexpr TypedWhichId<SwTableFormulaUpdate> RES_TABLEFML_UPDATE(170);
+constexpr TypedWhichId<SwMsgPoolItem> RES_UPDATEDDETBL(171);
+constexpr TypedWhichId<SwMsgPoolItem> RES_TBLHEADLINECHG(172);
+constexpr TypedWhichId<SwAutoFormatGetDocNode> RES_AUTOFMT_DOCNODE(173);
+constexpr TypedWhichId<SwMsgPoolItem> RES_SECTION_HIDDEN(174);
+constexpr TypedWhichId<SwMsgPoolItem> RES_SECTION_NOT_HIDDEN(175);
+constexpr TypedWhichId<SwMsgPoolItem> RES_GRAPHIC_PIECE_ARRIVED(177);
+constexpr TypedWhichId<SwMsgPoolItem> RES_HIDDENPARA_PRINT(178);
+constexpr TypedWhichId<SwVirtPageNumInfo> RES_VIRTPAGENUM_INFO(180);
+constexpr TypedWhichId<SwPtrMsgPoolItem> RES_REMOVE_UNO_OBJECT(181);
// empty
-constexpr TypedWhichId<SwFindNearestNode> RES_FINDNEARESTNODE(182);
-constexpr TypedWhichId<SwPtrMsgPoolItem> RES_CONTENT_VISIBLE(183);
-constexpr TypedWhichId<SwMsgPoolItem> RES_GRAPHIC_SWAPIN(184);
-constexpr TypedWhichId<SwStringMsgPoolItem> RES_NAME_CHANGED(185);
-constexpr TypedWhichId<SwStringMsgPoolItem> RES_TITLE_CHANGED(186);
-constexpr TypedWhichId<SwStringMsgPoolItem> RES_DESCRIPTION_CHANGED(187);
-constexpr TypedWhichId<SwMsgPoolItem> RES_LINKED_GRAPHIC_STREAM_ARRIVED(187);
-constexpr sal_uInt16 RES_MSG_END(188);
+constexpr TypedWhichId<SwFindNearestNode> RES_FINDNEARESTNODE(184);
+constexpr TypedWhichId<SwPtrMsgPoolItem> RES_CONTENT_VISIBLE(185);
+constexpr TypedWhichId<SwMsgPoolItem> RES_GRAPHIC_SWAPIN(186);
+constexpr TypedWhichId<SwStringMsgPoolItem> RES_NAME_CHANGED(187);
+constexpr TypedWhichId<SwStringMsgPoolItem> RES_TITLE_CHANGED(188);
+constexpr TypedWhichId<SwStringMsgPoolItem> RES_DESCRIPTION_CHANGED(189);
+constexpr TypedWhichId<SwMsgPoolItem> RES_LINKED_GRAPHIC_STREAM_ARRIVED(189);
+constexpr sal_uInt16 RES_MSG_END(190);
// An ID for the RTF-reader. The stylesheets are treated like attributes,
// i.e. there is a StyleSheet-attribute. To avoid collision with other
@@ -446,13 +448,13 @@ constexpr sal_uInt16 RES_MSG_END(188);
// new attributes!)
constexpr sal_uInt16 RES_FLTRATTR_BEGIN(RES_MSG_END);
constexpr TypedWhichId<SfxStringItem> RES_FLTR_BOOKMARK(RES_FLTRATTR_BEGIN);
-constexpr TypedWhichId<SwFltAnchor> RES_FLTR_ANCHOR(189);
-constexpr TypedWhichId<SfxStringItem> RES_FLTR_NUMRULE(190);
-constexpr TypedWhichId<SwFltTOX> RES_FLTR_TOX(191);
-constexpr TypedWhichId<SwFltRedline> RES_FLTR_REDLINE(192);
-constexpr TypedWhichId<CntUInt16Item> RES_FLTR_ANNOTATIONMARK(193);
-constexpr TypedWhichId<SwFltRDFMark> RES_FLTR_RDFMARK(194);
-constexpr sal_uInt16 RES_FLTRATTR_END(195);
+constexpr TypedWhichId<SwFltAnchor> RES_FLTR_ANCHOR(191);
+constexpr TypedWhichId<SfxStringItem> RES_FLTR_NUMRULE(192);
+constexpr TypedWhichId<SwFltTOX> RES_FLTR_TOX(193);
+constexpr TypedWhichId<SwFltRedline> RES_FLTR_REDLINE(194);
+constexpr TypedWhichId<CntUInt16Item> RES_FLTR_ANNOTATIONMARK(195);
+constexpr TypedWhichId<SwFltRDFMark> RES_FLTR_RDFMARK(196);
+constexpr sal_uInt16 RES_FLTRATTR_END(197);
constexpr sal_uInt16 RES_TBX_DUMMY(RES_FLTRATTR_END + 1);
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 25fed4c87783..e83d42251882 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -166,6 +166,10 @@ public:
const SwTableBox& m_rTableBox;
MoveTableBoxHint(const SwFrameFormat& rNewFormat, const SwTableBox& rTableBox): m_rNewFormat(rNewFormat), m_rTableBox(rTableBox) {};
};
+
+class DocumentDyingHint final : public SfxHint
+{
+};
}
class SwUpdateAttr final : public SwMsgPoolItem
diff --git a/sw/inc/inspectorproperties.hrc b/sw/inc/inspectorproperties.hrc
index 6ef374a2f857..0def6ab41780 100644
--- a/sw/inc/inspectorproperties.hrc
+++ b/sw/inc/inspectorproperties.hrc
@@ -173,12 +173,13 @@
#define RID_LIST_AUTO_FORMAT NC_("RID_ATTRIBUTE_NAMES_MAP", "List Auto Format")
#define RID_LIST_ID NC_("RID_ATTRIBUTE_NAMES_MAP", "List Id")
#define RID_LIST_LABEL_STRING NC_("RID_ATTRIBUTE_NAMES_MAP", "List Label String")
+#define RID_METADATA_REFERENCE NC_("RID_ATTRIBUTE_NAMES_MAP", "Metadata Reference")
#define RID_NESTED_TEXT_CONTENT NC_("RID_ATTRIBUTE_NAMES_MAP", "Nested Text Content")
#define RID_NUMBERING_IS_NUMBER NC_("RID_ATTRIBUTE_NAMES_MAP", "Numbering is Number")
#define RID_NUMBERING_LEVEL NC_("RID_ATTRIBUTE_NAMES_MAP", "Numbering Level")
#define RID_NUMBERING_RULES NC_("RID_ATTRIBUTE_NAMES_MAP", "Numbering Rules")
#define RID_NUMBERING_START_VALUE NC_("RID_ATTRIBUTE_NAMES_MAP", "Numbering Start Value")
-#define RID_NUMBERING_STYLE_NAME NC_("RID_ATTRIBUTE_NAMES_MAP", "Numbering Style Name")
+#define RID_NUMBERING_STYLE_NAME NC_("RID_ATTRIBUTE_NAMES_MAP", "List Style Name")
#define RID_OUTLINE_CONTENT_VISIBLE NC_("RID_ATTRIBUTE_NAMES_MAP", "Outline Content Visible")
#define RID_OUTLINE_LEVEL NC_("RID_ATTRIBUTE_NAMES_MAP", "Outline Level")
#define RID_PAGE_DESC_NAME NC_("RID_ATTRIBUTE_NAMES_MAP", "Page Desc Name")
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 39060d62501b..9603ce4f4440 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -180,7 +180,7 @@ private:
bool m_bOrigPurgeOle;
public:
PurgeGuard(const SwDoc& rDoc);
- ~PurgeGuard();
+ ~PurgeGuard() COVERITY_NOEXCEPT_FALSE;
};
#endif // _ INCLUDED_SW_INC_NDOLE_HXX
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index f83bab3cebba..50986f3daca7 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -16,8 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SW_INC_NDTXT_HXX
-#define INCLUDED_SW_INC_NDTXT_HXX
+#pragma once
#include <cppuhelper/weakref.hxx>
@@ -348,7 +347,7 @@ public:
/// Virtual methods from ContentNode.
virtual SwContentFrame *MakeFrame( SwFrame* ) override;
SwTextNode * SplitContentNode(const SwPosition &,
- std::function<void (SwTextNode *, sw::mark::RestoreMode)> const* pContentIndexRestore);
+ std::function<void (SwTextNode *, sw::mark::RestoreMode, bool AtStart)> const* pContentIndexRestore);
virtual SwContentNode *JoinNext() override;
void JoinPrev();
@@ -747,7 +746,7 @@ public:
/// change text to Upper/Lower/Hiragana/Katakana/...
void TransliterateText( utl::TransliterationWrapper& rTrans,
sal_Int32 nStart, sal_Int32 nEnd,
- SwUndoTransliterate* pUndo );
+ SwUndoTransliterate* pUndo, bool bUseRedlining = false );
/// count words in given range - returns true if we refreshed out count
bool CountWords( SwDocStat& rStat, sal_Int32 nStart, sal_Int32 nEnd ) const;
@@ -804,7 +803,7 @@ public:
virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const override;
/// In MS Word, the font underline setting of the paragraph end position won't affect the formatting of numbering, so we ignore it
- static bool IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich);
+ static bool IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich, bool bIsCharStyle = false);
void FormatDropNotify(const SwFormatDrop& rDrop) override
{ TriggerNodeUpdate(sw::LegacyModifyHint(&rDrop, &rDrop)); };
};
@@ -868,6 +867,4 @@ inline sal_Int32 SwTextNode::GetSpaceLeft() const
return TXTNODE_MAX-m_Text.getLength();
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index c69347fde410..a65b4872c5fd 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -23,6 +23,7 @@
#include <sal/types.h>
#include "swdllapi.h"
+#include "BorderCacheOwner.hxx"
#include "ndarr.hxx"
#include "ndtyp.hxx"
#include "index.hxx"
@@ -77,7 +78,7 @@ namespace drawinglayer::attribute {
/// Base class of the Writer document model elements.
class SW_DLLPUBLIC SwNode
- : private BigPtrEntry
+ : public sw::BorderCacheOwner, private BigPtrEntry
{
friend class SwNodes;
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index a6136a4db141..fd333da0d864 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -136,7 +136,7 @@ private:
bool mbCountPhantoms;
bool mbUsedByRedline; /// it needs to export as part of tracked numbering change
- const SvxNumberFormat::SvxNumPositionAndSpaceMode meDefaultNumberFormatPositionAndSpaceMode;
+ SvxNumberFormat::SvxNumPositionAndSpaceMode meDefaultNumberFormatPositionAndSpaceMode;
OUString msDefaultListId;
std::shared_ptr<SfxGrabBagItem> mpGrabBagItem; ///< Style InteropGrabBag.
@@ -153,6 +153,8 @@ public:
bool operator==( const SwNumRule& ) const;
bool operator!=( const SwNumRule& r ) const { return !(*this == r); }
+ void Reset( const OUString& rName );
+
const SwNumFormat* GetNumFormat( sal_uInt16 i ) const;
const SwNumFormat& Get( sal_uInt16 i ) const;
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 7f2eaa9c9d53..efeb6539b400 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -148,6 +148,17 @@ class SW_DLLPUBLIC SwPageDesc
// FIXME epicycles growing here - page margins need to be stored differently
SwFrameFormat m_FirstMaster;
SwFrameFormat m_FirstLeft;
+
+ struct StashedPageDesc
+ {
+ std::shared_ptr<SwFrameFormat> m_pStashedFirst;
+ std::shared_ptr<SwFrameFormat> m_pStashedLeft;
+ std::shared_ptr<SwFrameFormat> m_pStashedFirstLeft;
+ };
+
+ mutable StashedPageDesc m_aStashedHeader;
+ mutable StashedPageDesc m_aStashedFooter;
+
sw::WriterMultiListener m_aDepends; ///< Because of grid alignment (Registerhaltigkeit).
mutable const SwTextFormatColl* m_pTextFormatColl;
SwPageDesc *m_pFollow;
@@ -206,6 +217,18 @@ public:
bool IsHidden() const { return m_IsHidden; }
void SetHidden(bool const bValue) { m_IsHidden = bValue; }
+ /// Remember original header/footer formats even when they are hidden by "sharing".
+ void StashFrameFormat(const SwFrameFormat& rFormat, bool bHeader, bool bLeft, bool bFirst);
+
+ /// Used to restore hidden header/footer formats.
+ const SwFrameFormat* GetStashedFrameFormat(bool bHeader, bool bLeft, bool bFirst) const;
+
+ /// Checks if the pagedescriptor has a stashed format according to the parameters or not.
+ bool HasStashedFormat(bool bHeader, bool bLeft, bool bFirst);
+
+ /// Gives the feature of removing the stashed format by hand if it is necessary.
+ void RemoveStashedFormat(bool bHeader, bool bLeft, bool bFirst);
+
/// Same as WriteUseOn(), but the >= HeaderShare part of the bitfield is not modified.
inline void SetUseOn( UseOnPage eNew );
inline UseOnPage GetUseOn() const;
diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx
index a544b316fe09..e7285cfe2611 100644
--- a/sw/inc/pch/precompiled_msword.hxx
+++ b/sw/inc/pch/precompiled_msword.hxx
@@ -13,18 +13,20 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-12-15 11:16:12 using:
+ Generated on 2021-04-11 19:48:30 using:
./bin/update_pch sw msword --cutoff=4 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
./bin/update_pch_bisect ./sw/inc/pch/precompiled_msword.hxx "make sw.build" --find-conflicts
*/
+#include <sal/config.h>
#if PCH_LEVEL >= 1
#include <algorithm>
#include <array>
#include <assert.h>
#include <cassert>
+#include <chrono>
#include <climits>
#include <cmath>
#include <cstddef>
@@ -52,7 +54,6 @@
#include <string>
#include <string_view>
#include <type_traits>
-#include <typeinfo>
#include <unordered_map>
#include <unordered_set>
#include <utility>
@@ -100,7 +101,7 @@
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>
#include <rtl/uuid.h>
-#include <sal/config.h>
+#include <sal/backtrace.hxx>
#include <sal/detail/log.h>
#include <sal/log.hxx>
#include <sal/macros.h>
@@ -108,27 +109,30 @@
#include <sal/saldllapi.h>
#include <sal/types.h>
#include <sal/typesizes.h>
+#include <vcl/BinaryDataContainer.hxx>
#include <vcl/GraphicAttributes.hxx>
#include <vcl/GraphicExternalLink.hxx>
#include <vcl/GraphicObject.hxx>
-#include <vcl/IDialogRenderable.hxx>
#include <vcl/Scanline.hxx>
#include <vcl/alpha.hxx>
#include <vcl/animate/Animation.hxx>
#include <vcl/animate/AnimationBitmap.hxx>
#include <vcl/bitmap.hxx>
+#include <vcl/bitmap/BitmapTypes.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/cairo.hxx>
#include <vcl/checksum.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
#include <vcl/errcode.hxx>
+#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/gfxlink.hxx>
#include <vcl/graph.hxx>
#include <vcl/idle.hxx>
+#include <vcl/keycod.hxx>
#include <vcl/keycodes.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/metaactiontypes.hxx>
@@ -139,6 +143,7 @@
#include <vcl/region.hxx>
#include <vcl/salnativewidgets.hxx>
#include <vcl/scopedbitmapaccess.hxx>
+#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/task.hxx>
#include <vcl/timer.hxx>
@@ -149,7 +154,6 @@
#include <vcl/vectorgraphicdata.hxx>
#include <vcl/wall.hxx>
#include <vcl/weld.hxx>
-#include <vcl/window.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
#include <basegfx/basegfxdllapi.h>
@@ -182,6 +186,7 @@
#include <basic/sbxvar.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <com/sun/star/awt/DeviceInfo.hpp>
#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/awt/GradientStyle.hpp>
#include <com/sun/star/awt/Key.hpp>
@@ -352,6 +357,7 @@
#include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/underlyingenumvalue.hxx>
+#include <o3tl/unit_conversion.hxx>
#include <ooo/vba/XHelperInterface.hpp>
#include <ooo/vba/word/XParagraphFormat.hpp>
#include <oox/dllapi.h>
@@ -447,6 +453,7 @@
#include <svx/svdundo.hxx>
#include <svx/svdxcgv.hxx>
#include <svx/svxdllapi.h>
+#include <svx/swframetypes.hxx>
#include <svx/unoapi.hxx>
#include <svx/xdash.hxx>
#include <svx/xdef.hxx>
@@ -481,7 +488,6 @@
#include <tools/toolsdllapi.h>
#include <tools/weakbase.h>
#include <tools/weakbase.hxx>
-#include <tools/wintypes.hxx>
#include <typelib/typeclass.h>
#include <typelib/typedescription.h>
#include <typelib/uik.h>
@@ -507,6 +513,7 @@
#include <vbahelper/vbahelperinterface.hxx>
#endif // PCH_LEVEL >= 3
#if PCH_LEVEL >= 4
+#include <BorderCacheOwner.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentLayoutAccess.hxx>
@@ -533,6 +540,7 @@
#include <fmtcol.hxx>
#include <fmtflcnt.hxx>
#include <fmtfld.hxx>
+#include <fmtfollowtextflow.hxx>
#include <fmtfsize.hxx>
#include <fmtftn.hxx>
#include <fmthdft.hxx>
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index c82e4ee98d28..0ecdc4eb2bb3 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -13,13 +13,14 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-12-04 09:59:58 using:
+ Generated on 2021-04-08 13:52:12 using:
./bin/update_pch sw sw --cutoff=7 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
./bin/update_pch_bisect ./sw/inc/pch/precompiled_sw.hxx "make sw.build" --find-conflicts
*/
+#include <sal/config.h>
#if PCH_LEVEL >= 1
#include <algorithm>
#include <array>
@@ -32,7 +33,6 @@
#include <initializer_list>
#include <limits.h>
#include <limits>
-#include <list>
#include <map>
#include <memory>
#include <new>
@@ -42,6 +42,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
+#include <string>
#include <string_view>
#include <type_traits>
#include <unordered_map>
@@ -55,6 +56,7 @@
#if PCH_LEVEL >= 2
#include <osl/conditn.hxx>
#include <osl/diagnose.h>
+#include <osl/diagnose.hxx>
#include <osl/doublecheckedlocking.h>
#include <osl/endian.h>
#include <osl/file.hxx>
@@ -79,7 +81,7 @@
#include <rtl/uri.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
-#include <sal/config.h>
+#include <sal/backtrace.hxx>
#include <sal/detail/log.h>
#include <sal/log.hxx>
#include <sal/macros.h>
@@ -122,6 +124,7 @@
#include <vcl/vclptr.hxx>
#include <vcl/virdev.hxx>
#include <vcl/weld.hxx>
+#include <vcl/weldutils.hxx>
#include <vcl/window.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
@@ -174,6 +177,7 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -323,6 +327,7 @@
#include <svl/cjkoptions.hxx>
#include <svl/ctloptions.hxx>
#include <svl/eitem.hxx>
+#include <svl/grabbagitem.hxx>
#include <svl/hint.hxx>
#include <svl/intitem.hxx>
#include <svl/itemiter.hxx>
@@ -565,6 +570,7 @@
#include <iodetect.hxx>
#include <istyleaccess.hxx>
#include <layact.hxx>
+#include <layfrm.hxx>
#include <layouter.hxx>
#include <lineinfo.hxx>
#include <list.hxx>
@@ -624,6 +630,7 @@
#include <tabcol.hxx>
#include <tabfrm.hxx>
#include <tblafmt.hxx>
+#include <tblrwcl.hxx>
#include <tblsel.hxx>
#include <textboxhelper.hxx>
#include <textsh.hxx>
diff --git a/sw/inc/pch/precompiled_swui.hxx b/sw/inc/pch/precompiled_swui.hxx
index c92c90ff5205..2b69b961d26b 100644
--- a/sw/inc/pch/precompiled_swui.hxx
+++ b/sw/inc/pch/precompiled_swui.hxx
@@ -13,13 +13,14 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-12-15 11:16:27 using:
+ Generated on 2021-04-11 19:48:47 using:
./bin/update_pch sw swui --cutoff=3 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
./bin/update_pch_bisect ./sw/inc/pch/precompiled_swui.hxx "make sw.build" --find-conflicts
*/
+#include <sal/config.h>
#if PCH_LEVEL >= 1
#include <algorithm>
#include <array>
@@ -42,6 +43,7 @@
#include <math.h>
#include <memory>
#include <new>
+#include <numeric>
#include <optional>
#include <ostream>
#include <set>
@@ -51,7 +53,6 @@
#include <string>
#include <string_view>
#include <type_traits>
-#include <typeinfo>
#include <unordered_map>
#include <utility>
#include <vector>
@@ -66,6 +67,7 @@
#include <osl/mutex.h>
#include <osl/mutex.hxx>
#include <rtl/alloc.h>
+#include <rtl/character.hxx>
#include <rtl/instance.hxx>
#include <rtl/locale.h>
#include <rtl/math.h>
@@ -82,7 +84,7 @@
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>
#include <rtl/uuid.h>
-#include <sal/config.h>
+#include <sal/backtrace.hxx>
#include <sal/detail/log.h>
#include <sal/log.hxx>
#include <sal/macros.h>
@@ -90,7 +92,7 @@
#include <sal/types.h>
#include <sal/typesizes.h>
#include <vcl/AccessibleBrowseBoxObjType.hxx>
-#include <vcl/EnumContext.hxx>
+#include <vcl/BinaryDataContainer.hxx>
#include <vcl/GraphicAttributes.hxx>
#include <vcl/GraphicExternalLink.hxx>
#include <vcl/GraphicObject.hxx>
@@ -101,8 +103,8 @@
#include <vcl/animate/Animation.hxx>
#include <vcl/animate/AnimationBitmap.hxx>
#include <vcl/bitmap.hxx>
+#include <vcl/bitmap/BitmapTypes.hxx>
#include <vcl/bitmapex.hxx>
-#include <vcl/builder.hxx>
#include <vcl/builderpage.hxx>
#include <vcl/cairo.hxx>
#include <vcl/checksum.hxx>
@@ -113,7 +115,6 @@
#include <vcl/dockwin.hxx>
#include <vcl/errcode.hxx>
#include <vcl/event.hxx>
-#include <vcl/floatwin.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
#include <vcl/formatter.hxx>
@@ -128,7 +129,6 @@
#include <vcl/mapmod.hxx>
#include <vcl/metaactiontypes.hxx>
#include <vcl/metric.hxx>
-#include <vcl/notebookbar/NotebookBarAddonsMerger.hxx>
#include <vcl/outdev.hxx>
#include <vcl/outdevmap.hxx>
#include <vcl/outdevstate.hxx>
@@ -177,13 +177,13 @@
#include <basic/basicdllapi.h>
#include <basic/sbxcore.hxx>
#include <basic/sbxdef.hxx>
+#include <com/sun/star/awt/DeviceInfo.hpp>
#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/awt/GradientStyle.hpp>
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/awt/KeyGroup.hpp>
#include <com/sun/star/awt/SystemPointer.hpp>
#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
@@ -498,7 +498,6 @@
#include <unotools/nativenumberwrapper.hxx>
#include <unotools/options.hxx>
#include <unotools/pathoptions.hxx>
-#include <unotools/resmgr.hxx>
#include <unotools/sharedunocomponent.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/transliterationwrapper.hxx>
@@ -508,6 +507,7 @@
#include <vbahelper/vbahelperinterface.hxx>
#endif // PCH_LEVEL >= 3
#if PCH_LEVEL >= 4
+#include <BorderCacheOwner.hxx>
#include <IDocumentDeviceAccess.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IMark.hxx>
diff --git a/sw/inc/pch/precompiled_vbaswobj.hxx b/sw/inc/pch/precompiled_vbaswobj.hxx
index bf9a58114714..fd017e55b968 100644
--- a/sw/inc/pch/precompiled_vbaswobj.hxx
+++ b/sw/inc/pch/precompiled_vbaswobj.hxx
@@ -13,19 +13,21 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-12-15 11:16:33 using:
+ Generated on 2021-04-11 19:48:51 using:
./bin/update_pch sw vbaswobj --cutoff=4 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
./bin/update_pch_bisect ./sw/inc/pch/precompiled_vbaswobj.hxx "make sw.build" --find-conflicts
*/
+#include <sal/config.h>
#if PCH_LEVEL >= 1
#include <algorithm>
#include <array>
#include <assert.h>
#include <atomic>
#include <cassert>
+#include <chrono>
#include <climits>
#include <cmath>
#include <cstddef>
@@ -52,7 +54,6 @@
#include <string>
#include <string_view>
#include <type_traits>
-#include <typeinfo>
#include <unordered_map>
#include <utility>
#include <vector>
@@ -84,20 +85,19 @@
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>
#include <rtl/uuid.h>
-#include <sal/config.h>
+#include <sal/backtrace.hxx>
#include <sal/detail/log.h>
#include <sal/log.hxx>
#include <sal/macros.h>
#include <sal/saldllapi.h>
#include <sal/types.h>
#include <sal/typesizes.h>
-#include <vcl/EnumContext.hxx>
#include <vcl/IDialogRenderable.hxx>
#include <vcl/Scanline.hxx>
#include <vcl/alpha.hxx>
#include <vcl/bitmap.hxx>
+#include <vcl/bitmap/BitmapTypes.hxx>
#include <vcl/bitmapex.hxx>
-#include <vcl/builder.hxx>
#include <vcl/cairo.hxx>
#include <vcl/checksum.hxx>
#include <vcl/cursor.hxx>
@@ -107,7 +107,6 @@
#include <vcl/exceptiontypes.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
-#include <vcl/image.hxx>
#include <vcl/inputtypes.hxx>
#include <vcl/keycod.hxx>
#include <vcl/keycodes.hxx>
@@ -153,10 +152,10 @@
#include <basic/sberrors.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <com/sun/star/awt/DeviceInfo.hpp>
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/awt/KeyGroup.hpp>
#include <com/sun/star/awt/SystemPointer.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
@@ -170,7 +169,6 @@
#include <com/sun/star/document/EventObject.hpp>
#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/i18n/CollatorOptions.hpp>
#include <com/sun/star/i18n/WordType.hpp>
@@ -312,14 +310,13 @@
#include <unotools/fontcvt.hxx>
#include <unotools/fontdefs.hxx>
#include <unotools/options.hxx>
-#include <unotools/resmgr.hxx>
-#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
#include <vbahelper/vbadllapi.h>
#include <vbahelper/vbahelper.hxx>
#include <vbahelper/vbahelperinterface.hxx>
#endif // PCH_LEVEL >= 3
#if PCH_LEVEL >= 4
+#include <BorderCacheOwner.hxx>
#include <IDocumentMarkAccess.hxx>
#include <IMark.hxx>
#include <IShellCursorSupplier.hxx>
diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx
index 31cb1dfa2c49..358747e37808 100644
--- a/sw/inc/poolfmt.hxx
+++ b/sw/inc/poolfmt.hxx
@@ -133,7 +133,7 @@ RES_POOLCHR_NORMAL_END,
RES_POOLCHR_HTML_BEGIN = RES_POOLCHR_BEGIN + 50, ///< HTML-styles.
RES_POOLCHR_HTML_EMPHASIS = RES_POOLCHR_HTML_BEGIN,
-RES_POOLCHR_HTML_CITIATION,
+RES_POOLCHR_HTML_CITATION,
RES_POOLCHR_HTML_STRONG,
RES_POOLCHR_HTML_CODE,
RES_POOLCHR_HTML_SAMPLE,
@@ -185,7 +185,8 @@ RES_POOLPAGE_END
enum RES_POOL_NUMRULE_TYPE
{
RES_POOLNUMRULE_BEGIN = POOLGRP_NUMRULE,
-RES_POOLNUMRULE_NUM1 = RES_POOLNUMRULE_BEGIN, ///< NumRule Numbering 123.
+RES_POOLNUMRULE_NOLIST = RES_POOLNUMRULE_BEGIN,
+RES_POOLNUMRULE_NUM1, ///< NumRule Numbering 123.
RES_POOLNUMRULE_NUM2, ///< NumRule Numbering ABC.
RES_POOLNUMRULE_NUM3, ///< NumRule Numbering abc.
RES_POOLNUMRULE_NUM4, ///< NumRule Numbering IVX.
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 356f42e114db..5b4f3319ca05 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -138,7 +138,7 @@ public:
}
virtual const SfxBroadcaster* GetBroadcaster() const override
{
- return dynamic_cast<const SfxBroadcaster *> (&mrFormatField);
+ return &mrFormatField;
}
virtual VclPtr<sw::annotation::SwAnnotationWin> GetSidebarWindow(
SwEditWin& rEditWin,
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 0d39c2adc9ba..f67b3ecf9a31 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -23,8 +23,19 @@
#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String)
#define NNC_(Context, StringSingular, StringPlural) reinterpret_cast<char const *>(Context "\004" u8##StringSingular "\004" u8##StringPlural)
+// Dialog buttons
+#define STR_STANDARD_LABEL NC_("STR_STANDARD_LABEL", "Reset to ~Parent")
+#define STR_STANDARD_TOOLTIP NC_("STR_STANDARD_TOOLTIP", "Values on this tab specified in “Contains” in Organizer are removed.")
+#define STR_STANDARD_EXTENDEDTIP NC_("STR_STANDARD_EXTENDEDTIP", "Values in this tab are set to the corresponding values of the style specified in “Inherit from” in Organizer. In all cases, also when “Inherit from” is “None”, the current tab values specified in “Contains” are removed.")
+#define STR_RESET_LABEL NC_("STR_RESET_LABEL", "Reset")
+#define STR_RESET_TOOLTIP NC_("STR_RESET_TOOLTIP", "Unsaved modifications to this tab are reverted.")
+#define STR_RESET_EXTENDEDTIP NC_("STR_RESET_EXTENDEDTIP", "Revert any changes made on the current tab to the settings that were present when this dialog was opened, or after the last use of “Apply”.")
+#define STR_APPLY_LABEL NC_("STR_APPLY_LABEL", "Apply")
+#define STR_APPLY_TOOLTIP NC_("STR_APPLY_TOOLTIP", "Applies modifications on all tabs without closing dialog. Cannot be reverted with Reset.")
+#define STR_APPLY_EXTENDEDTIP NC_("STR_APPLY_EXTENDEDTIP", "Applies all modifications without closing dialog. Values are saved and cannot be reverted with Reset.")
+
// Format names
-#define STR_POOLCHR_STANDARD NC_("STR_POOLCHR_STANDARD", "Default Character Style")
+#define STR_POOLCHR_STANDARD NC_("STR_POOLCHR_STANDARD", "No Character Style")
#define STR_POOLCHR_FOOTNOTE NC_("STR_POOLCHR_FOOTNOTE", "Footnote Characters")
#define STR_POOLCHR_PAGENO NC_("STR_POOLCHR_PAGENO", "Page Number")
#define STR_POOLCHR_LABEL NC_("STR_POOLCHR_LABEL", "Caption Characters")
@@ -44,7 +55,7 @@
#define STR_POOLCHR_VERT_NUM NC_("STR_POOLCHR_VERT_NUM", "Vertical Numbering Symbols")
// Drawing templates for HTML
#define STR_POOLCHR_HTML_EMPHASIS NC_("STR_POOLCHR_HTML_EMPHASIS", "Emphasis")
-#define STR_POOLCHR_HTML_CITIATION NC_("STR_POOLCHR_HTML_CITIATION", "Quotation")
+#define STR_POOLCHR_HTML_CITATION NC_("STR_POOLCHR_HTML_CITATION", "Quotation")
#define STR_POOLCHR_HTML_STRONG NC_("STR_POOLCHR_HTML_STRONG", "Strong Emphasis")
#define STR_POOLCHR_HTML_CODE NC_("STR_POOLCHR_HTML_CODE", "Source Text")
#define STR_POOLCHR_HTML_SAMPLE NC_("STR_POOLCHR_HTML_SAMPLE", "Example")
@@ -200,6 +211,7 @@
#define STR_POOLPAGE_ENDNOTE NC_("STR_POOLPAGE_ENDNOTE", "Endnote")
#define STR_POOLPAGE_LANDSCAPE NC_("STR_POOLPAGE_LANDSCAPE", "Landscape")
// Numbering rules
+#define STR_POOLNUMRULE_NOLIST NC_("STR_POOLNUMRULE_NOLIST", "No List")
#define STR_POOLNUMRULE_NUM1 NC_("STR_POOLNUMRULE_NUM1", "Numbering 123")
#define STR_POOLNUMRULE_NUM2 NC_("STR_POOLNUMRULE_NUM2", "Numbering ABC")
#define STR_POOLNUMRULE_NUM3 NC_("STR_POOLNUMRULE_NUM3", "Numbering abc")
@@ -376,7 +388,7 @@
#define STR_IDXEXAMPLE_IDXMARK_SECONDARY_KEY NC_("STR_IDXEXAMPLE_IDXMARK_SECONDARY_KEY", "Secondary key")
#define STR_CONTENT_TYPE_SINGLE_OUTLINE NC_("STR_CONTENT_TYPE_SINGLE_OUTLINE", "Heading")
#define STR_CONTENT_TYPE_SINGLE_TABLE NC_("STR_CONTENT_TYPE_SINGLE_TABLE", "Table")
-#define STR_CONTENT_TYPE_SINGLE_FRAME NC_("STR_CONTENT_TYPE_SINGLE_FRAME", "Text frame")
+#define STR_CONTENT_TYPE_SINGLE_FRAME NC_("STR_CONTENT_TYPE_SINGLE_FRAME", "Frame")
#define STR_CONTENT_TYPE_SINGLE_GRAPHIC NC_("STR_CONTENT_TYPE_SINGLE_GRAPHIC", "Image")
#define STR_CONTENT_TYPE_SINGLE_OLE NC_("STR_CONTENT_TYPE_SINGLE_OLE", "OLE object")
#define STR_CONTENT_TYPE_SINGLE_BOOKMARK NC_("STR_CONTENT_TYPE_SINGLE_BOOKMARK", "Bookmark")
@@ -392,6 +404,10 @@
#define STR_HYPH_TITLE NC_("STR_HYPH_TITLE", "Hyphenation")
#define STR_HYPH_MISSING NC_("STR_HYPH_MISSING", "Missing hyphenation data")
#define STR_HYPH_MISSING_DETAIL NC_("STR_HYPH_MISSING", "Please install the hyphenation package for locale “%1”.")
+#define STR_HIDDEN_CHANGES NC_("STR_HIDDEN_CHANGES", "Track Changes")
+#define STR_HIDDEN_CHANGES_DETAIL NC_("STR_HIDDEN_CHANGES_DETAIL", "Document contains tracked changes and recording is enabled.")
+#define STR_HIDDEN_CHANGES_DETAIL2 NC_("STR_HIDDEN_CHANGES_DETAIL2", "Recording of changes is enabled.")
+#define STR_HIDDEN_CHANGES_DETAIL3 NC_("STR_HIDDEN_CHANGES_DETAIL3", "Document contains tracked changes.")
// Undo
#define STR_CANT_UNDO NC_("STR_CANT_UNDO", "not possible")
@@ -475,8 +491,8 @@
#define STR_TABLE_TBLCPYTBL NC_("STR_TABLE_TBLCPYTBL", "Copy table")
#define STR_TABLE_CPYTBL NC_("STR_TABLE_CPYTBL", "Copy table")
#define STR_INS_FROM_SHADOWCRSR NC_("STR_INS_FROM_SHADOWCRSR", "Set cursor")
-#define STR_UNDO_CHAIN NC_("STR_UNDO_CHAIN", "Link text frames")
-#define STR_UNDO_UNCHAIN NC_("STR_UNDO_UNCHAIN", "Unlink text frames")
+#define STR_UNDO_CHAIN NC_("STR_UNDO_CHAIN", "Link frames")
+#define STR_UNDO_UNCHAIN NC_("STR_UNDO_UNCHAIN", "Unlink frames")
#define STR_UNDO_FTNINFO NC_("STR_UNDO_FTNINFO", "Modify footnote options")
#define STR_UNDO_COMPAREDOC NC_("STR_UNDO_COMPAREDOC", "Compare Document")
#define STR_UNDO_SETFLYFRMFMT NC_("STR_UNDO_SETFLYFRMFMT", "Apply frame style: $1")
@@ -593,7 +609,7 @@
#define STR_STYLE_FAMILY_PARAGRAPH NC_("STR_STYLE_FAMILY_PARAGRAPH", "Paragraph")
#define STR_STYLE_FAMILY_FRAME NC_("STR_STYLE_FAMILY_FRAME", "Frame")
#define STR_STYLE_FAMILY_PAGE NC_("STR_STYLE_FAMILY_PAGE", "Pages")
-#define STR_STYLE_FAMILY_NUMBERING NC_("STR_STYLE_FAMILY_NUMBERING", "Numbering")
+#define STR_STYLE_FAMILY_NUMBERING NC_("STR_STYLE_FAMILY_NUMBERING", "List")
#define STR_STYLE_FAMILY_TABLE NC_("STR_STYLE_FAMILY_TABLE", "Table")
#define STR_STYLE_FAMILY_CELL NC_("STR_STYLE_FAMILY_CELL", "Cell")
@@ -643,14 +659,14 @@
#define STR_OUTLINE_TRACKING_DEFAULT NC_("STR_OUTLINE_TRACKING_DEFAULT", "Default")
#define STR_OUTLINE_TRACKING_FOCUS NC_("STR_OUTLINE_TRACKING_FOCUS", "Focus")
#define STR_OUTLINE_TRACKING_OFF NC_("STR_OUTLINE_TRACKING_OFF", "Off")
-#define STR_OUTLINE_CONTENT_TOGGLE_VISIBILITY NC_("STR_OUTLINE_CONTENT_TOGGLE_VISIBILITY", "Click to toggle content visibility")
+#define STR_OUTLINE_CONTENT_TOGGLE_VISIBILITY NC_("STR_OUTLINE_CONTENT_TOGGLE_VISIBILITY", "Click to toggle outline folding")
#define STR_OUTLINE_CONTENT_TOGGLE_VISIBILITY_EXT NC_("STR_OUTLINE_CONTENT_TOGGLE_VISIBILITY_EXT", "right-click to include sub levels")
-#define STR_CLICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY NC_("STR_CLICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY", "Click to toggle content visibility")
+#define STR_CLICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY NC_("STR_CLICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY", "Click to toggle outline folding")
#define STR_CLICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY_EXT NC_("STR_CLICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY_EXT", "right-click to include sub levels")
-#define STR_OUTLINE_CONTENT_VISIBILITY NC_("STR_OUTLINE_CONTENT", "Outline Content Visibility")
+#define STR_OUTLINE_CONTENT_VISIBILITY NC_("STR_OUTLINE_CONTENT", "Outline Folding")
#define STR_OUTLINE_CONTENT_VISIBILITY_TOGGLE NC_("STR_OUTLINE_CONTENT_VISIBILITY_TOGGLE", "Toggle")
-#define STR_OUTLINE_CONTENT_VISIBILITY_SHOW_ALL NC_("STR_OUTLINE_CONTENT_VISIBILITY_SHOW_ALL", "Show All")
-#define STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL NC_("STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL", "Hide All")
+#define STR_OUTLINE_CONTENT_VISIBILITY_SHOW_ALL NC_("STR_OUTLINE_CONTENT_VISIBILITY_SHOW_ALL", "Unfold All")
+#define STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL NC_("STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL", "Fold All")
#define STR_EXPANDALL NC_("STR_EXPANDALL", "Expand All")
#define STR_COLLAPSEALL NC_("STR_COLLAPSEALL", "Collapse All")
@@ -748,6 +764,7 @@
#define STR_AUTH_TYPE_CUSTOM3 NC_("STR_AUTH_TYPE_CUSTOM3", "User-defined3")
#define STR_AUTH_TYPE_CUSTOM4 NC_("STR_AUTH_TYPE_CUSTOM4", "User-defined4")
#define STR_AUTH_TYPE_CUSTOM5 NC_("STR_AUTH_TYPE_CUSTOM5", "User-defined5")
+#define STR_AUTH_TYPE_LOCAL_FILE NC_("STR_AUTH_TYPE_LOCAL_FILE", "Local file")
#define STR_AUTH_FIELD_IDENTIFIER NC_("STR_AUTH_FIELD_IDENTIFIER", "Short name")
#define STR_AUTH_FIELD_AUTHORITY_TYPE NC_("STR_AUTH_FIELD_AUTHORITY_TYPE", "Type")
#define STR_AUTH_FIELD_ADDRESS NC_("STR_AUTH_FIELD_ADDRESS", "Address")
@@ -1115,8 +1132,8 @@
#define STR_MAX_FTN_HEIGHT NC_("STR_MAX_FTN_HEIGHT", "Max. footnote area:")
#define STR_EDIT_IN_READONLY NC_("STR_EDIT_IN_READONLY", "Editable in read-only document")
#define STR_LAYOUT_SPLIT NC_("STR_LAYOUT_SPLIT", "Split")
-#define STR_NUMRULE_ON NC_("STR_NUMRULE_ON", "Numbering")
-#define STR_NUMRULE_OFF NC_("STR_NUMRULE_OFF", "no numbering")
+#define STR_NUMRULE_ON NC_("STR_NUMRULE_ON", "List Style: (%LISTSTYLENAME)")
+#define STR_NUMRULE_OFF NC_("STR_NUMRULE_OFF", "List Style: (None)")
#define STR_CONNECT1 NC_("STR_CONNECT1", "linked to ")
#define STR_CONNECT2 NC_("STR_CONNECT2", "and ")
#define STR_LINECOUNT NC_("STR_LINECOUNT", "Count lines")
@@ -1146,7 +1163,7 @@
#define STR_CONNECT_BORDER_OFF NC_("STR_CONNECT_BORDER_OFF", "Do not merge borders")
#define ST_TBL NC_("ST_TBL", "Table")
-#define ST_FRM NC_("ST_FRM", "Text Frame")
+#define ST_FRM NC_("ST_FRM", "Frame")
#define ST_PGE NC_("ST_PGE", "Page")
#define ST_DRW NC_("ST_DRW", "Drawing")
#define ST_CTRL NC_("ST_CTRL", "Control")
@@ -1166,7 +1183,7 @@
#define ST_RECENCY NC_("ST_RECENCY", "Recency")
// Strings for the quickhelp of the View-PgUp/Down-Buttons
#define STR_IMGBTN_TBL_DOWN NC_("STR_IMGBTN_TBL_DOWN", "Next table")
-#define STR_IMGBTN_FRM_DOWN NC_("STR_IMGBTN_FRM_DOWN", "Next text frame")
+#define STR_IMGBTN_FRM_DOWN NC_("STR_IMGBTN_FRM_DOWN", "Next frame")
#define STR_IMGBTN_PGE_DOWN NC_("STR_IMGBTN_PGE_DOWN", "Next page")
#define STR_IMGBTN_DRW_DOWN NC_("STR_IMGBTN_DRW_DOWN", "Next drawing")
#define STR_IMGBTN_CTRL_DOWN NC_("STR_IMGBTN_CTRL_DOWN", "Next control")
@@ -1182,7 +1199,7 @@
#define STR_IMGBTN_SRCH_REP_DOWN NC_("STR_IMGBTN_SRCH_REP_DOWN", "Continue search forward")
#define STR_IMGBTN_INDEX_ENTRY_DOWN NC_("STR_IMGBTN_INDEX_ENTRY_DOWN", "Next index entry")
#define STR_IMGBTN_TBL_UP NC_("STR_IMGBTN_TBL_UP", "Previous table")
-#define STR_IMGBTN_FRM_UP NC_("STR_IMGBTN_FRM_UP", "Previous text frame")
+#define STR_IMGBTN_FRM_UP NC_("STR_IMGBTN_FRM_UP", "Previous frame")
#define STR_IMGBTN_PGE_UP NC_("STR_IMGBTN_PGE_UP", "Previous page")
#define STR_IMGBTN_DRW_UP NC_("STR_IMGBTN_DRW_UP", "Previous drawing")
#define STR_IMGBTN_CTRL_UP NC_("STR_IMGBTN_CTRL_UP", "Previous control")
@@ -1389,6 +1406,9 @@
#define STR_AUTOMARK_NO NC_("createautomarkdialog|no", "No")
#define STR_WRAP_PANEL_CUSTOM_STR NC_("sidebarwrap|customlabel", "Custom")
+#define STR_DATASOURCE_NOT_AVAILABLE NC_("STR_DATASOURCE_NOT_AVAILABLE", "Data source is not available. Mail merge wizard will not work properly.")
+#define STR_EXCHANGE_DATABASE NC_("STR_EXCHANGE_DATABASE", "Exchange Database")
+
#endif
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index c29b98214281..35b81e524754 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -433,7 +433,7 @@ public:
virtual VclPtr<AbstractSwFieldDlg> CreateSwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, weld::Window *pParent) = 0;
virtual VclPtr<SfxAbstractDialog> CreateSwFieldEditDlg ( SwView& rVw ) = 0;
- virtual VclPtr<AbstractSwRenameXNamedDlg> CreateSwRenameXNamedDlg(weld::Window* pParent,
+ virtual VclPtr<AbstractSwRenameXNamedDlg> CreateSwRenameXNamedDlg(weld::Widget* pParent,
css::uno::Reference< css::container::XNamed > & xNamed,
css::uno::Reference< css::container::XNameAccess > & xNameAccess) = 0;
virtual VclPtr<AbstractSwModalRedlineAcceptDlg> CreateSwModalRedlineAcceptDlg(weld::Window *pParent) = 0;
@@ -481,7 +481,7 @@ public:
const SfxItemSet* pSwItemSet,
SwWrtShell &) = 0;
virtual VclPtr<AbstractMultiTOXTabDialog> CreateMultiTOXTabDialog(
- weld::Window* pParent, const SfxItemSet& rSet,
+ weld::Widget* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
SwTOXBase* pCurTOX,
bool bGlobal) = 0;
diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
index 425db6b6e3f6..e18020320544 100644
--- a/sw/inc/swevent.hxx
+++ b/sw/inc/swevent.hxx
@@ -127,10 +127,10 @@ struct SwCallMouseEvent final
switch(pLegacy->GetWhich())
{
case RES_FMT_CHG:
- bClear |= static_cast<SwFormatChg const*>(pLegacy->m_pOld)->pChangedFormat == PTR.pFormat;
+ bClear |= pLegacy->m_pOld->StaticWhichCast(RES_FMT_CHG).pChangedFormat == PTR.pFormat;
break;
case RES_REMOVE_UNO_OBJECT:
- bClear |= static_cast<SwPtrMsgPoolItem const*>(pLegacy->m_pOld)->pObject == PTR.pFormat;
+ bClear |= pLegacy->m_pOld->StaticWhichCast(RES_REMOVE_UNO_OBJECT).pObject == PTR.pFormat;
}
if(bClear)
Clear();
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 24e9c248b167..519229e2f230 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -129,6 +129,8 @@ SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, vcl::RenderContext* pOutDe
const sal_Unicode cMarkSeparator = '|';
// Sequences names for jumps are <name of sequence>!<no>
const char cSequenceMarkSeparator = '!';
+/// separator for toxmarks: #<no>%19<text>%19<type><typename>|toxmark
+sal_Unicode const toxMarkSeparator = '\u0019';
#define DB_DELIM u'\x00ff' // Database <-> table separator.
@@ -167,7 +169,7 @@ constexpr bool SW_ISPRINTABLE(sal_Unicode c) { return c >= ' ' && 127 != c; }
#define CHAR_RLM u'\x200F'
#define CHAR_LRM u'\x200E'
#define CHAR_ZWSP u'\x200B'
-#define CHAR_ZWNBSP u'\x2060'
+#define CHAR_WJ u'\x2060'
#define CHAR_NNBSP u'\x202F' //NARROW NO-BREAK SPACE
// Returns the APP - CharClass instance - used for all ToUpper/ToLower/...
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index 0c20711b109c..d4d1e0153383 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -11,6 +11,7 @@
#define INCLUDED_SW_INC_TEXTBOXHELPER_HXX
#include <map>
+#include <optional>
#include <set>
#include <vector>
@@ -72,6 +73,8 @@ public:
/// Get a property of the underlying TextFrame.
static void getProperty(SwFrameFormat const* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID,
css::uno::Any& rValue);
+ /// Get a property of the underlying TextFrame.
+ static css::uno::Any getProperty(SwFrameFormat const* pShape, OUString sPropName);
/// There are two types of enum of anchor type, so this function maps this.
static css::text::TextContentAnchorType mapAnchorType(const RndStdIds& rAnchorID);
@@ -79,9 +82,48 @@ public:
/// Similar to syncProperty(), but used by the internal API (e.g. for UI purposes).
static void syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet const& rSet);
+ /// Returns the SwFrameFormat* of the given UNO-XShape if exists otherwise nullptr.
+ static SwFrameFormat* getShapeFormat(css::uno::Reference<css::drawing::XShape> xShape);
+
/// Copy shape attributes to the text frame
static void updateTextBoxMargin(SdrObject* pObj);
+ /// Sets the surround to through for the textframe of the given shape,
+ /// not to interfere with the layout. Returns true on success.
+ static bool setWrapThrough(SwFrameFormat* pShape);
+
+ /// Sets the surround to through for the textframe of the given shape,
+ /// not to interfere with the layout. Returns true on success.
+ static bool setWrapThrough(css::uno::Reference<css::drawing::XShape> xShape);
+
+ /// Sets the anchor of the associated textframe of the given shape, and
+ /// returns true on success.
+ static bool changeAnchor(SwFrameFormat* pShape);
+
+ /// Sets the anchor of the associated textframe of the given shape, and
+ /// returns true on success.
+ static bool changeAnchor(css::uno::Reference<css::drawing::XShape> xShape);
+
+ /// Does the positioning for the associated textframe of the shape, and
+ /// returns true on success.
+ static bool doTextBoxPositioning(SwFrameFormat* pShape);
+
+ /// Does the positioning for the associated textframe of the shape, and
+ /// returns true on success.
+ static bool doTextBoxPositioning(css::uno::Reference<css::drawing::XShape> xShape);
+
+ /// Returns true if the anchor different for the given shape, and the
+ /// associated textframe of the given shape.
+ /// Note: In case of AS_CHAR anchor the anchor type must be different,
+ /// because if not, layout breaks, but this situation also handled by
+ /// this function, and returns true in that case too.
+ static std::optional<bool> isAnchorTypeDifferent(SwFrameFormat* pShape);
+
+ /// Returns true if the given shape has a valid textframe.
+ static bool isTextBoxShapeHasValidTextFrame(SwFrameFormat* pShape);
+ /// Returns true if the given shape has a valid textframe.
+ static bool isTextBoxShapeHasValidTextFrame(css::uno::Reference<css::drawing::XShape> xShape);
+
/**
* If we have an associated TextFrame, then return that.
*
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index c7bcaacf036a..4555335e44ae 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -19,20 +19,21 @@
#ifndef INCLUDED_SW_INC_TOX_HXX
#define INCLUDED_SW_INC_TOX_HXX
-#include <cppuhelper/weakref.hxx>
-#include <sal/log.hxx>
+#include <vector>
+#include <optional>
+#include <cppuhelper/weakref.hxx>
+#include <editeng/svxenum.hxx>
#include <i18nlangtag/lang.h>
-#include <svl/poolitem.hxx>
+#include <o3tl/typed_flags_set.hxx>
+#include <sal/log.hxx>
#include <svl/listener.hxx>
+#include <svl/poolitem.hxx>
-#include <editeng/svxenum.hxx>
+#include "calbck.hxx"
+#include "hints.hxx"
#include "swtypes.hxx"
#include "toxe.hxx"
-#include "calbck.hxx"
-#include <o3tl/typed_flags_set.hxx>
-
-#include <vector>
namespace com::sun::star {
namespace text { class XDocumentIndexMark; }
@@ -69,6 +70,8 @@ namespace sw {
const SwRootFrame* m_pLayout;
CollectTextTOXMarksForLayoutHint(std::vector<std::reference_wrapper<SwTextTOXMark>>& rMarks, const SwRootFrame* pLayout) : m_rMarks(rMarks), m_pLayout(pLayout) {}
};
+ SW_DLLPUBLIC auto PrepareJumpToTOXMark(SwDoc const& rDoc, OUString const& rName)
+ -> std::optional<std::pair<SwTOXMark, sal_Int32>>;
}
// Entry of content index, alphabetical index or user defined index
@@ -467,6 +470,13 @@ public:
SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = nullptr );
virtual ~SwTOXBase() override;
+ virtual void SwClientNotify(const SwModify& rMod, const SfxHint& rHint) override
+ {
+ if(dynamic_cast<const sw::DocumentDyingHint*>(&rHint))
+ GetRegisteredIn()->Remove(this);
+ else
+ SwClient::SwClientNotify(rMod, rHint);
+ }
// a kind of CopyCtor - check if the TOXBase is at TOXType of the doc.
// If not, so create it and copy all other used things.
void CopyTOXBase( SwDoc*, const SwTOXBase& );
diff --git a/sw/inc/toxwrap.hxx b/sw/inc/toxwrap.hxx
index 63a09b323ff0..9427f9f5eafd 100644
--- a/sw/inc/toxwrap.hxx
+++ b/sw/inc/toxwrap.hxx
@@ -30,14 +30,14 @@ namespace com::sun::star::i18n { class XExtendedIndexEntrySupplier; }
class SW_DLLPUBLIC IndexEntrySupplierWrapper
{
- css::lang::Locale aLcl;
- css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > xIES;
+ css::lang::Locale m_aLcl;
+ css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > m_xIES;
public:
IndexEntrySupplierWrapper();
~IndexEntrySupplierWrapper();
- void SetLocale( const css::lang::Locale& rLocale ) { aLcl = rLocale; }
+ void SetLocale( const css::lang::Locale& rLocale ) { m_aLcl = rLocale; }
OUString GetIndexKey( const OUString& rText, const OUString& rTextReading,
const css::lang::Locale& rLocale ) const;
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 90509a929309..8018712eaa23 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -34,6 +34,10 @@
class SfxItemPool;
+/**
+ * A wrapper around SfxPoolItem to store the start position of (usually) a text portion, with an
+ * optional end.
+ */
class SAL_DLLPUBLIC_RTTI SwTextAttr
{
friend class SwpHints;
@@ -121,7 +125,7 @@ public:
inline const SwFormatINetFormat &GetINetFormat() const;
inline const SwFormatRuby &GetRuby() const;
- void dumpAsXml(xmlTextWriterPtr pWriter) const;
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
};
class SAL_DLLPUBLIC_RTTI SwTextAttrEnd : public virtual SwTextAttr
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index 9d6aa60ff49b..c451b89e7abe 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -64,6 +64,7 @@ public:
sal_uInt16 GetSeqRefNo() const { return m_nSeqNo; }
static void SetUniqueSeqRefNo( SwDoc& rDoc );
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
inline const SwTextNode& SwTextFootnote::GetTextNode() const
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index 28984e6950e3..f7477565a4d7 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -29,6 +29,7 @@
class SfxItemSet;
class SfxItemPropertySet;
struct SfxItemPropertySimpleEntry;
+struct SfxItemPropertyMapEntry;
class SdrObject;
class SwTextNode;
class SwCursor;
@@ -77,7 +78,7 @@ namespace SwUnoCursorHelper
GetNestedTextContent(SwTextNode const & rTextNode, sal_Int32 const nIndex,
bool const bParent);
- bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry
+ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry
, SwPaM& rPam
, css::uno::Any *pAny
, css::beans::PropertyState& eState
@@ -91,7 +92,7 @@ namespace SwUnoCursorHelper
{ return rUnoCursor.GetContentNode() &&
rUnoCursor.GetPoint()->nContent == rUnoCursor.GetContentNode()->Len();}
- void resetCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam);
+ void resetCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry, SwPaM& rPam);
/// @throws css::lang::IllegalArgumentException
/// @throws css::io::IOException
/// @throws css::uno::RuntimeException
@@ -217,7 +218,7 @@ namespace SwUnoCursorHelper
/// @throws css::uno::RuntimeException
/// @throws css::uno::DeploymentException
bool SetCursorPropertyValue(
- SfxItemPropertySimpleEntry const& rEntry,
+ SfxItemPropertyMapEntry const& rEntry,
css::uno::Any const& rValue,
SwPaM & rPam, SfxItemSet & rItemSet);
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index 22ddffda5881..e9e69318cdea 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -80,8 +80,7 @@ SwXDrawPageBaseClass;
class SwXDrawPage final : public SwXDrawPageBaseClass
{
SwDoc* m_pDoc;
- css::uno::Reference< css::uno::XAggregation > m_xPageAgg;
- SwFmDrawPage* m_pDrawPage;
+ rtl::Reference<SwFmDrawPage> m_pDrawPage;
public:
SwXDrawPage(SwDoc* pDoc);
virtual ~SwXDrawPage() override;
diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx
index eb89ce47249e..dc4d22f896cd 100644
--- a/sw/inc/unoparagraph.hxx
+++ b/sw/inc/unoparagraph.hxx
@@ -212,7 +212,7 @@ public:
struct SwXParagraphEnumeration
: public SwSimpleEnumeration_Base
{
- static SwXParagraphEnumeration* Create(
+ static rtl::Reference<SwXParagraphEnumeration> Create(
css::uno::Reference< css::text::XText > const & xParent,
const std::shared_ptr<SwUnoCursor>& pCursor,
const CursorType eType,
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 8fc67fdf5206..9cceac0f8d0f 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -66,6 +66,7 @@
#define UNO_NAME_PARA_HYPHENATION_NO_CAPS "ParaHyphenationNoCaps"
#define UNO_NAME_LEFT_MARGIN "LeftMargin"
#define UNO_NAME_RIGHT_MARGIN "RightMargin"
+#define UNO_NAME_GUTTER_MARGIN "GutterMargin"
#define UNO_NAME_HEADER_LEFT_MARGIN "HeaderLeftMargin"
#define UNO_NAME_HEADER_RIGHT_MARGIN "HeaderRightMargin"
#define UNO_NAME_FOOTER_LEFT_MARGIN "FooterLeftMargin"
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index 7ec4121a9ad8..e7d9a224e259 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -141,7 +141,7 @@ public:
virtual sal_Bool SAL_CALL hasElements( ) override;
SwTableBox* GetTableBox() const { return m_pBox; }
- static SwXCell* CreateXCell(SwFrameFormat* pTableFormat, SwTableBox* pBox, SwTable *pTable = nullptr );
+ static rtl::Reference<SwXCell> CreateXCell(SwFrameFormat* pTableFormat, SwTableBox* pBox, SwTable *pTable = nullptr );
SwTableBox* FindBox(SwTable* pTable, SwTableBox* pBox);
SwFrameFormat* GetFrameFormat() const { return m_pTableFormat; }
double GetForcedNumericalValue() const;
diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx
index 5b3c518e79b9..7bbffae58d20 100644
--- a/sw/inc/unotextbodyhf.hxx
+++ b/sw/inc/unotextbodyhf.hxx
@@ -48,7 +48,7 @@ public:
SwXBodyText(SwDoc *const pDoc);
- SwXTextCursor * CreateTextCursor(const bool bIgnoreTables = false);
+ rtl::Reference<SwXTextCursor> CreateTextCursor(const bool bIgnoreTables = false);
// XInterface
virtual css::uno::Any SAL_CALL queryInterface(
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx
index 693595e76eef..f3ed06fb4a06 100644
--- a/sw/inc/unotextrange.hxx
+++ b/sw/inc/unotextrange.hxx
@@ -217,7 +217,7 @@ typedef ::cppu::WeakImplHelper
struct SwXTextRanges : public SwXTextRanges_Base
{
virtual SwUnoCursor* GetCursor() =0;
- static SwXTextRanges* Create(SwPaM* const pCursor);
+ static rtl::Reference<SwXTextRanges> Create(SwPaM* const pCursor);
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
};
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 48f49a2694b7..b03d59cffd95 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -146,11 +146,9 @@ private:
SwDocShell* m_pDocShell;
bool m_bObjectValid;
- SwXDrawPage* m_pDrawPage;
- css::uno::Reference< css::drawing::XDrawPage > mxXDrawPage;
+ rtl::Reference<SwXDrawPage> m_xDrawPage;
- css::uno::Reference< css::text::XText > m_xBodyText;
- SwXBodyText* m_pBodyText;
+ rtl::Reference<SwXBodyText> m_xBodyText;
css::uno::Reference< css::uno::XAggregation > m_xNumFormatAgg;
css::uno::Reference< css::container::XIndexAccess > mxXNumberingRules;
@@ -398,7 +396,7 @@ public:
/// @see vcl::ITiledRenderable::getDocumentSize().
virtual Size getDocumentSize() override;
/// @see vcl::ITiledRenderable::setPart().
- virtual void setPart(int nPart) override;
+ virtual void setPart(int nPart, bool bAllowChangeFocus = true) override;
/// @see vcl::ITiledRenderable::getParts().
virtual int getParts() override;
/// @see vcl::ITiledRenderable::getPart().
@@ -560,9 +558,12 @@ class SwXOutlineTarget final : public cppu::WeakImplHelper
{
const SfxItemPropertySet* m_pPropSet;
OUString m_sOutlineText;
+ OUString m_sActualText;
+ const sal_Int32 m_nOutlineLevel;
public:
- SwXOutlineTarget(const OUString& rOutlineText);
+ SwXOutlineTarget(const OUString& rOutlineText, const rtl::OUString &rActualText,
+ const sal_Int32 nOutlineLevel);
virtual ~SwXOutlineTarget() override;
//XPropertySet
diff --git a/sw/inc/utlui.hrc b/sw/inc/utlui.hrc
index 3d356fc9bc0c..5bf81226392d 100644
--- a/sw/inc/utlui.hrc
+++ b/sw/inc/utlui.hrc
@@ -45,7 +45,8 @@ const char* RID_SHELLRES_AUTOFMTSTRS[] =
NC_("RID_SHELLRES_AUTOFMTSTRS", "Set \"Heading $(ARG1)\" Style"),
NC_("RID_SHELLRES_AUTOFMTSTRS", "Set \"Bullet\" or \"Numbering\" Style"),
NC_("RID_SHELLRES_AUTOFMTSTRS", "Combine paragraphs"),
- NC_("RID_SHELLRES_AUTOFMTSTRS", "Add non breaking space")
+ NC_("RID_SHELLRES_AUTOFMTSTRS", "Add non breaking space"),
+ NC_("RID_SHELLRES_AUTOFMTSTRS", "Transliterates RTL Hungarian text to Old Hungarian script")
};
#endif
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index abdba739c3b7..4232d315478a 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -148,6 +148,18 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
friend class SwView_Impl;
friend class SwClipboardChangeListener;
+ // selection cycle
+ struct SelectCycle
+ {
+ Point m_pInitialCursor;
+ Point m_MarkPt;
+ Point m_PointPt;
+ sal_uInt16 nStep;
+
+ SelectCycle() :
+ nStep(0) {}
+ };
+
// search & replace
static SvxSearchItem *s_pSrchItem;
@@ -245,13 +257,15 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
m_bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
m_bOldShellWasPagePreview : 1,
m_bIsPreviewDoubleClick : 1, // #i114045#
- m_bMakeSelectionVisible : 1; // transport the bookmark selection
+ m_bMakeSelectionVisible : 1, // transport the bookmark selection
+ m_bForceChangesToolbar : 1; // on load of documents with change tracking
bool m_bInitOnceCompleted = false;
/// LibreOfficeKit has to force the page size for PgUp/PgDown
/// functionality based on the user's view, instead of using the m_aVisArea.
SwTwips m_nLOKPageUpDownOffset;
+ SelectCycle m_aSelectCycle;
// methods for searching
// set search context
SAL_DLLPRIVATE bool SearchAndWrap(bool bApi);
@@ -372,7 +386,7 @@ public:
virtual SdrView* GetDrawView() const override;
virtual bool HasUIFeature(SfxShellFeature nFeature) const override;
virtual void ShowCursor( bool bOn = true ) override;
- virtual ErrCode DoVerb( tools::Long nVerb ) override;
+ virtual ErrCode DoVerb(sal_Int32 nVerb) override;
virtual sal_uInt16 SetPrinter( SfxPrinter* pNew,
SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL) override;
@@ -541,6 +555,8 @@ public:
// form control has been activated
DECL_LINK( FormControlActivated, LinkParamNone*, void );
+ DECL_LINK( ExchangeDatabaseHandler, weld::Button&, void);
+
// edit links
void EditLinkDlg();
void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = nullptr);
@@ -610,6 +626,10 @@ public:
std::shared_ptr<SwMailMergeConfigItem> const & GetMailMergeConfigItem() const;
std::shared_ptr<SwMailMergeConfigItem> EnsureMailMergeConfigItem(const SfxItemSet* pArgs = nullptr);
+ OUString GetDataSourceName() const;
+ static bool IsDataSourceAvailable(const OUString sDataSourceName);
+ void AppendDataSourceInfobar();
+
void ExecFormatPaintbrush(SfxRequest const &);
void StateFormatPaintbrush(SfxItemSet &);
@@ -673,6 +693,8 @@ public:
void SetOldFrameCat(const OUString& sStr);
const OUString& GetOldDrwCat();
void SetOldDrwCat(const OUString& sStr);
+
+ virtual tools::Rectangle getLOKVisibleArea() const override;
};
inline tools::Long SwView::GetXScroll() const
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 006a3f9b3dd3..c1ae8daa452f 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -30,7 +30,6 @@
#include "swdllapi.h"
class SwRect;
-namespace vcl { class Window; }
class OutputDevice;
class SwDocShell;
namespace svtools{ class ColorConfig;}
@@ -201,7 +200,7 @@ public:
SwViewOption(const SwViewOption&);
~SwViewOption();
- static void Init( vcl::Window const *pWin ); // Initializing of static data.
+ static void Init(const OutputDevice* pWin); // Initializing of static data.
ViewOptFlags1 GetCoreOptions() const {return m_nCoreOptions;}
inline void SetUIOptions( const SwViewOption& );
diff --git a/sw/ooxmlexport_setup.mk b/sw/ooxmlexport_setup.mk
index 85763f591b43..0381e3e24829 100644
--- a/sw/ooxmlexport_setup.mk
+++ b/sw/ooxmlexport_setup.mk
@@ -69,6 +69,8 @@ $(eval $(call gb_CppunitTest_use_configuration,sw_ooxmlexport$(1)))
$(eval $(call gb_CppunitTest_use_uiconfigs,sw_ooxmlexport$(1),\
modules/swriter \
+ sfx \
+ svt \
))
$(eval $(call gb_CppunitTest_use_packages,sw_ooxmlexport$(1),\
@@ -80,6 +82,13 @@ $(call gb_CppunitTest_get_target,sw_ooxmlexport$(1)) : $(call gb_Library_get_tar
$(eval $(call gb_CppunitTest_use_more_fonts,sw_ooxmlexport$(1)))
+ifeq ($(OS),WNT)
+# gpgme-w32spawn.exe is needed in workdir/LinkTarget/Executable
+$(eval $(call gb_CppunitTest_use_packages,sw_ooxmlexport$(1),\
+ $(call gb_Helper_optional,GPGMEPP,gpgmepp)\
+))
+endif
+
endef
# vim: set noet sw=4 ts=4:
diff --git a/sw/qa/api/SwXDocumentSettings.cxx b/sw/qa/api/SwXDocumentSettings.cxx
index 6345a053adc4..da2b366dae94 100644
--- a/sw/qa/api/SwXDocumentSettings.cxx
+++ b/sw/qa/api/SwXDocumentSettings.cxx
@@ -74,8 +74,6 @@ void SwXDocumentSettings::tearDown()
uno::Reference<uno::XInterface> SwXDocumentSettings::init()
{
mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
- CPPUNIT_ASSERT(mxComponent.is());
-
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<lang::XMultiServiceFactory> xFactory(xTextDocument, uno::UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXTextField.cxx b/sw/qa/api/SwXTextField.cxx
index 7bd56f809468..27a6eb40891c 100644
--- a/sw/qa/api/SwXTextField.cxx
+++ b/sw/qa/api/SwXTextField.cxx
@@ -73,7 +73,6 @@ void SwXTextField::triggerDesktopTerminate() { mxDesktop->terminate(); }
Reference<XInterface> SwXTextField::init()
{
component_ = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
- CPPUNIT_ASSERT(component_.is());
Reference<text::XTextDocument> xTextDocument(component_, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(component_, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXTextTable.cxx b/sw/qa/api/SwXTextTable.cxx
index 8f8f18062e7e..71a3a502cabc 100644
--- a/sw/qa/api/SwXTextTable.cxx
+++ b/sw/qa/api/SwXTextTable.cxx
@@ -69,7 +69,6 @@ void SwXTextTable::triggerDesktopTerminate() { mxDesktop->terminate(); }
Reference<XInterface> SwXTextTable::init()
{
component_ = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
- CPPUNIT_ASSERT(component_.is());
Reference<text::XTextDocument> xTextDocument(component_, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(component_, UNO_QUERY_THROW);
Reference<text::XText> xText = xTextDocument->getText();
diff --git a/sw/qa/api/terminate.cxx b/sw/qa/api/terminate.cxx
index 5f077d0aa1f8..9a0e26d4d7e2 100644
--- a/sw/qa/api/terminate.cxx
+++ b/sw/qa/api/terminate.cxx
@@ -53,7 +53,6 @@ css::uno::Reference<css::uno::XInterface> TerminateTest::init()
{
auto const component
= loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
- CPPUNIT_ASSERT(component.is());
css::uno::Reference<css::text::XTextDocument> xTextDocument(component,
css::uno::UNO_QUERY_THROW);
css::uno::Reference<css::lang::XMultiServiceFactory> xMSF(component, css::uno::UNO_QUERY_THROW);
diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx
index ea70a74aaccb..24c09a493d26 100644
--- a/sw/qa/core/Test-BigPtrArray.cxx
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -142,10 +142,15 @@ public:
bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count() / 2);
- CPPUNIT_ASSERT_MESSAGE
+ CPPUNIT_ASSERT_EQUAL_MESSAGE
+ (
+ "test_insert_entries_in_the_middle failed",
+ oldCount + 1, bparr.Count()
+ );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"test_insert_entries_in_the_middle failed",
- (oldCount + 1 == bparr.Count() && static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount() == NUM_ENTRIES)
+ NUM_ENTRIES, static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount()
);
CPPUNIT_ASSERT_MESSAGE
@@ -204,10 +209,15 @@ public:
sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count());
- CPPUNIT_ASSERT_MESSAGE
+ CPPUNIT_ASSERT_EQUAL_MESSAGE
+ (
+ "test_insert_at_end failed",
+ oldCount + 1, bparr.Count()
+ );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"test_insert_at_end failed",
- (oldCount + 1 == bparr.Count() && static_cast<BigPtrEntryMock*>(bparr[bparr.Count()-1])->getCount() == NUM_ENTRIES)
+ NUM_ENTRIES, static_cast<BigPtrEntryMock*>(bparr[bparr.Count()-1])->getCount()
);
CPPUNIT_ASSERT_MESSAGE
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..97b6a2bb7d79 100644
--- a/sw/qa/core/draw/draw.cxx
+++ b/sw/qa/core/draw/draw.cxx
@@ -15,6 +15,8 @@
#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 +48,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/fields/fields.cxx b/sw/qa/core/fields/fields.cxx
new file mode 100644
index 000000000000..74b94d7a3f8e
--- /dev/null
+++ b/sw/qa/core/fields/fields.cxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/text/XTextDocument.hpp>
+
+#include <comphelper/propertyvalue.hxx>
+
+#include <authfld.hxx>
+#include <docsh.hxx>
+#include <rootfrm.hxx>
+#include <wrtsh.hxx>
+#include <ndtxt.hxx>
+
+namespace
+{
+/// Covers sw/source/core/fields/ fixes.
+class Test : public SwModelTestBase
+{
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testAuthorityTooltip)
+{
+ // Create a document with a bibliography reference in it.
+ 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("Identifier", OUString("ARJ00")),
+ comphelper::makePropertyValue("Author", OUString("Ar, J")),
+ comphelper::makePropertyValue("Title", OUString("mytitle")),
+ comphelper::makePropertyValue("Year", OUString("2020")),
+ };
+ 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);
+
+ // Get the tooltip of the field.
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ SwPaM* pCursor = pWrtShell->GetCursor();
+ auto pField = dynamic_cast<SwAuthorityField*>(
+ SwCursorShell::GetFieldAtCursor(pCursor, /*bIncludeInputFieldAtStart=*/true));
+ CPPUNIT_ASSERT(pField);
+ SwTextNode* pTextNode = pCursor->GetNode().GetTextNode();
+ const SwTextAttr* pTextAttr = pTextNode->GetSwpHints().Get(0);
+ const SwRootFrame* pLayout = pWrtShell->GetLayout();
+ OUString aTooltip = pField->GetAuthority(pTextAttr, pLayout);
+
+ // Without the accompanying fix in place, generating this tooltip text was not possible without
+ // first inserting an empty bibliography table into the document.
+ CPPUNIT_ASSERT_EQUAL(OUString("ARJ00: Ar, J, mytitle, 2020"), aTooltip);
+}
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/frmedt/frmedt.cxx b/sw/qa/core/frmedt/frmedt.cxx
index 097db6402ae1..174fb70486f2 100644
--- a/sw/qa/core/frmedt/frmedt.cxx
+++ b/sw/qa/core/frmedt/frmedt.cxx
@@ -125,7 +125,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testPasteFlyInTextBox)
rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
pTransfer->Cut();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pDoc->GetSpzFrameFormats()->GetFormatCount());
- TransferableDataHelper aHelper(pTransfer.get());
+ TransferableDataHelper aHelper(pTransfer);
// When pasting that to an empty document.
SwTransferable::Paste(*pWrtShell, aHelper);
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/data/vmerge-cell-border.docx b/sw/qa/core/layout/data/vmerge-cell-border.docx
new file mode 100644
index 000000000000..11d7a76d22ec
--- /dev/null
+++ b/sw/qa/core/layout/data/vmerge-cell-border.docx
Binary files differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 6fe44dae97b6..f1880bffab67 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -9,6 +9,8 @@
#include <swmodeltestbase.hxx>
+#include <com/sun/star/style/PageStyleLayout.hpp>
+
#include <vcl/gdimtf.hxx>
#include <svx/svdpage.hxx>
@@ -161,12 +163,12 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testAnchorPositionBasedOnParagraph)
load(DATA_DIRECTORY, "tdf134783_testAnchorPositionBasedOnParagraph.fodt");
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "(//SwAnchoredDrawObject)[1]/bounds", "top", "1671");
- assertXPath(pXmlDoc, "(//SwAnchoredDrawObject)[1]/bounds", "bottom", "1732");
- assertXPath(pXmlDoc, "(//SwAnchoredDrawObject)[2]/bounds", "top", "1947");
- assertXPath(pXmlDoc, "(//SwAnchoredDrawObject)[2]/bounds", "bottom", "2008");
- assertXPath(pXmlDoc, "(//SwAnchoredDrawObject)[3]/bounds", "top", "3783");
- assertXPath(pXmlDoc, "(//SwAnchoredDrawObject)[3]/bounds", "bottom", "3844");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[1]/bounds", "top", "1671");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[1]/bounds", "bottom", "1732");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[2]/bounds", "top", "1947");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[2]/bounds", "bottom", "2008");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[3]/bounds", "top", "3783");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[3]/bounds", "bottom", "3844");
}
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxStaysInsideShape)
@@ -179,8 +181,8 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxStaysInsideShape)
// Without the fix in place, this test would have failed with
// - Expected: 1932
// - Actual : 7476
- assertXPath(pXmlDoc, "//fly/infos/bounds", "top", "1932");
- assertXPath(pXmlDoc, "//fly/infos/bounds", "bottom", "7184");
+ assertXPath(pXmlDoc, "//anchored/fly/infos/bounds", "top", "1932");
+ assertXPath(pXmlDoc, "//anchored/fly/infos/bounds", "bottom", "7184");
}
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxNotModifiedOnOpen)
@@ -208,10 +210,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxAutoGrowVertical)
discardDumpedLayout();
xmlDocUniquePtr pLayout = parseLayoutDump();
CPPUNIT_ASSERT(pLayout);
- sal_Int32 nFlyLeft = getXPath(pLayout, "//fly/infos/bounds", "left").toInt32();
- sal_Int32 nFlyTop = getXPath(pLayout, "//fly/infos/bounds", "top").toInt32();
- sal_Int32 nFlyRight = getXPath(pLayout, "//fly/infos/bounds", "right").toInt32();
- sal_Int32 nFlyBottom = getXPath(pLayout, "//fly/infos/bounds", "bottom").toInt32();
+ sal_Int32 nFlyLeft = getXPath(pLayout, "//anchored/fly/infos/bounds", "left").toInt32();
+ sal_Int32 nFlyTop = getXPath(pLayout, "//anchored/fly/infos/bounds", "top").toInt32();
+ sal_Int32 nFlyRight = getXPath(pLayout, "//anchored/fly/infos/bounds", "right").toInt32();
+ sal_Int32 nFlyBottom = getXPath(pLayout, "//anchored/fly/infos/bounds", "bottom").toInt32();
tools::Rectangle aFlyRect(nFlyLeft, nFlyTop, nFlyRight, nFlyBottom);
// Without the accompanying fix in place, this test would have failed, as aFlyRect was too wide,
// so it was not inside aShapeRect anymore.
@@ -272,6 +274,231 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testKeepwithnextFullheight)
assertXPath(pXmlDoc, "//page[2]/body/txt/anchored/fly", 1);
}
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMargin)
+{
+ // Create a document, remember the old left edge of the page print area (the rectangle that is
+ // inside margins).
+ 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 nOldLeft = pPage->getFramePrintArea().Left();
+
+ // Set the gutter margin to 2cm.
+ sal_Int32 nGutterMm100 = 2000;
+ xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100));
+
+ // Verify that the new left edge is larger.
+ tools::Long nNewLeft = pPage->getFramePrintArea().Left();
+ 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 not added to the left margin.
+ CPPUNIT_ASSERT_EQUAL(nGutterTwips, nNewLeft - nOldLeft);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterTopMargin)
+{
+ // Create a document, remember the old top edge of the page print area (the rectangle that is
+ // inside margins).
+ SwDoc* pDoc = createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xSettings(
+ xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY);
+ xSettings->setPropertyValue("GutterAtTop", uno::makeAny(true));
+ uno::Reference<beans::XPropertySet> xStandard(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ SwFrame* pPage = pLayout->GetLower();
+ tools::Long nOldTop = pPage->getFramePrintArea().Top();
+
+ // Set the gutter margin to 2cm.
+ sal_Int32 nGutterMm100 = 2000;
+ xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100));
+
+ // Verify that the new top edge is larger.
+ tools::Long nNewTop = pPage->getFramePrintArea().Top();
+ 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 not added to the left margin.
+ CPPUNIT_ASSERT_EQUAL(nGutterTwips, nNewTop - nOldTop);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMirrorMargin)
+{
+ SwDoc* pDoc = createSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->InsertPageBreak();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ SwFrame* pPage = pLayout->GetLower();
+ tools::Long nOldLeft = pPage->getFramePrintArea().Left();
+ SwFrame* pPage2 = pPage->GetNext();
+ tools::Long nOldRight = pPage2->getFramePrintArea().Right();
+
+ uno::Reference<beans::XPropertySet> xStandard(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ xStandard->setPropertyValue("PageStyleLayout", uno::makeAny(style::PageStyleLayout_MIRRORED));
+ sal_Int32 nGutterMm100 = 2000;
+ xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100));
+
+ tools::Long nNewLeft = pPage->getFramePrintArea().Left();
+ tools::Long nGutterTwips = convertMm100ToTwip(nGutterMm100);
+ CPPUNIT_ASSERT_EQUAL(nGutterTwips, nNewLeft - nOldLeft);
+ tools::Long nNewRight = pPage2->getFramePrintArea().Right();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1134
+ // - Actual : 0
+ // i.e. the gutter was missing on the second, mirrored page.
+ 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?
+// FIXME this is random on Windows at the moment (in two subsequent tests without any scaling,
+// the actual values were 6346, 10066) - something broke metafile generation on Windows?
+#if !defined(MACOSX) && !defined(_WIN32)
+ // Given a document with a non-0 gutter margin.
+ SwDoc* pDoc = createSwDoc();
+ uno::Reference<beans::XPropertySet> xStandard(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ sal_Int32 nGutterMm100 = 2000;
+ xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100));
+
+ // When setting a left border.
+ table::BorderLine2 aBorder;
+ aBorder.LineWidth = 2;
+ aBorder.OuterLineWidth = 2;
+ xStandard->setPropertyValue("LeftBorder", uno::makeAny(aBorder));
+
+ // Then make sure border is at the left edge of the text area.
+ SwDocShell* pShell = pDoc->GetDocShell();
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2565
+ // - Actual : 1425
+ // Where 2565 is close to the left edge of the text area (2553).
+ assertXPath(pXmlDoc, "//polyline[@style='solid']/point[1]", "x", "2565");
+#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:
+ SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "vmerge-cell-border.docx");
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // When rendering the table:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Make sure that B4->B5 has no borders.
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ // Collect vertical positions of all border points.
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//polyline[@style='solid']/point");
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ std::vector<sal_Int32> aBorderPositions;
+ for (int i = 0; i < xmlXPathNodeSetGetLength(pXmlNodes); ++i)
+ {
+ xmlNodePtr pXmlNode = pXmlNodes->nodeTab[i];
+ xmlChar* pValue = xmlGetProp(pXmlNode, BAD_CAST("y"));
+ sal_Int32 nValue = OString(reinterpret_cast<char const*>(pValue)).toInt32();
+ aBorderPositions.push_back(nValue);
+ }
+ xmlXPathFreeObject(pXmlObj);
+ // Collect top and bottom of the B1->B3 rows.
+ xmlDocUniquePtr pLayout = parseLayoutDump();
+ pXmlObj = getXPathNode(pLayout, "//tab/row/infos/bounds");
+ pXmlNodes = pXmlObj->nodesetval;
+ std::vector<sal_Int32> aLayoutPositions;
+ for (int i = 0; i < 3; ++i)
+ {
+ xmlNodePtr pXmlNode = pXmlNodes->nodeTab[i];
+ if (i == 0)
+ {
+ xmlChar* pValue = xmlGetProp(pXmlNode, BAD_CAST("top"));
+ sal_Int32 nValue = OString(reinterpret_cast<char const*>(pValue)).toInt32();
+ aLayoutPositions.push_back(nValue);
+ }
+ xmlChar* pValue = xmlGetProp(pXmlNode, BAD_CAST("bottom"));
+ sal_Int32 nValue = OString(reinterpret_cast<char const*>(pValue)).toInt32();
+ aLayoutPositions.push_back(nValue);
+ }
+ xmlXPathFreeObject(pXmlObj);
+ // Check if any border is outside the B1->B3 range.
+ for (const auto nBorderPosition : aBorderPositions)
+ {
+ bool bFound = false;
+ for (const auto nLayoutPosition : aLayoutPositions)
+ {
+ if (std::abs(nBorderPosition - nLayoutPosition) <= 15)
+ {
+ bFound = true;
+ break;
+ }
+ }
+ std::stringstream ss;
+ ss << "Bad vertical position for border point: " << nBorderPosition;
+ ss << " Expected positions: ";
+ for (size_t i = 0; i < aLayoutPositions.size(); ++i)
+ {
+ if (i > 0)
+ {
+ ss << ", ";
+ }
+ ss << aLayoutPositions[i];
+ }
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Bad vertical position for border point: 5624 Expected positions: 3022, 3540, 4059, 4578
+ // i.e. the middle vertical border end was the bottom of B5, not bottom of B3.
+ CPPUNIT_ASSERT_MESSAGE(ss.str(), bFound);
+ }
+}
+
+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 cb2616333486..66f2dd9b2794 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -113,9 +113,6 @@ void SwMacrosTest::testVba()
OUString aFileName;
createFileURL(testInfo[i].sFileBaseName, u"doc", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.text.TextDocument");
- OUString sMsg = "Failed to load " + aFileName;
- CPPUNIT_ASSERT_MESSAGE( OUStringToOString( sMsg, RTL_TEXTENCODING_UTF8 ).getStr(), xComponent.is() );
-
OUString sUrl = testInfo[i].sMacroUrl;
Any aRet;
Sequence< sal_Int16 > aOutParamIndex;
@@ -209,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());
@@ -349,9 +345,6 @@ void SwMacrosTest::testFdo68983()
createFileURL(u"fdo68983.", u"odt", aFileName);
Reference< css::lang::XComponent > xComponent =
loadFromDesktop(aFileName, "com.sun.star.text.TextDocument");
-
- CPPUNIT_ASSERT_MESSAGE("Failed to load fdo68983.odt", xComponent.is());
-
Reference< frame::XStorable > xDocStorable(xComponent, UNO_QUERY_THROW);
utl::TempFile aTempFile;
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 2a35a41f1ec2..7c91bc797512 100644
--- a/sw/qa/core/objectpositioning/objectpositioning.cxx
+++ b/sw/qa/core/objectpositioning/objectpositioning.cxx
@@ -65,12 +65,12 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertPosFromBottom)
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32();
sal_Int32 nAnchoredBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds", "bottom").toInt32();
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds", "bottom").toInt32();
// Without the accompanying fix in place, this test would have failed with:
- // - Expected: 564
+ // - Expected: 565
// - Actual : 9035
// i.e. the vertical position was from-top, not from-bottom.
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(564), nBodyBottom - nAnchoredBottom);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(565), nBodyBottom - nAnchoredBottom);
}
CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMargin)
@@ -124,13 +124,15 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMargin)
sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32(); //14989
sal_Int32 nPageBottom = getXPath(pXmlDoc, "//page/infos/bounds", "bottom").toInt32(); //16123
sal_Int32 nFirstShapeBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "bottom").toInt32(); //16124
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[1]/bounds", "bottom")
+ .toInt32(); //16124
sal_Int32 nSecondShapeBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "bottom").toInt32(); //15699
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds", "bottom")
+ .toInt32(); //15699
sal_Int32 nSecondShapeTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top").toInt32(); //15414
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds", "top").toInt32(); //15414
sal_Int32 nThirdShapeTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top").toInt32(); //14989
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[3]/bounds", "top").toInt32(); //14989
// Verify that the distance between the bottom of page and bottom of first shape is around 0cm. (align=bottom)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nFirstShapeBottom - nPageBottom);
@@ -194,13 +196,15 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMarginWithF
sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32(); //14853
sal_Int32 nPageBottom = getXPath(pXmlDoc, "//page/infos/bounds", "bottom").toInt32(); //17121
sal_Int32 nFirstShapeBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "bottom").toInt32(); //17122
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[1]/bounds", "bottom")
+ .toInt32(); //17122
sal_Int32 nSecondShapeTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top").toInt32(); //15703
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds", "top").toInt32(); //15703
sal_Int32 nSecondShapeBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "bottom").toInt32(); //16272
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds", "bottom")
+ .toInt32(); //16272
sal_Int32 nThirdShapeTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top").toInt32(); //14853
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[3]/bounds", "top").toInt32(); //14853
// Verify that the distance between the bottom of page and bottom of first shape is around 0cm. (align=bottom)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nFirstShapeBottom - nPageBottom);
@@ -222,14 +226,15 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testInsideOutsideVertAlignBott
sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32(); //15704
sal_Int32 nPageBottom = getXPath(pXmlDoc, "//page/infos/bounds", "bottom").toInt32(); //17121
sal_Int32 nFirstShapeOutside
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "bottom").toInt32(); //17098
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[1]/bounds", "bottom")
+ .toInt32(); //17098
sal_Int32 nSecondShapeInside
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top").toInt32(); //15694
+ = getXPath(pXmlDoc, "//anchored/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)
@@ -245,17 +250,20 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVMLVertAlignBottomMargin)
sal_Int32 nPageBottom = getXPath(pXmlDoc, "//page/infos/bounds", "bottom").toInt32(); //16123
sal_Int32 nFirstVMLShapeInside
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "top").toInt32(); //11802
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[1]/bounds", "top").toInt32(); //11802
sal_Int32 nSecondVMLShapeBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "bottom").toInt32(); //16124
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds", "bottom")
+ .toInt32(); //16124
sal_Int32 nThirdVMLShapeCenterBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "bottom").toInt32(); //14185
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[3]/bounds", "bottom")
+ .toInt32(); //14185
sal_Int32 nThirdVMLShapeCenterTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top").toInt32(); //13741
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[3]/bounds", "top").toInt32(); //13741
sal_Int32 nFourthVMLShapeTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[4]/bounds", "top").toInt32(); //11802
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[4]/bounds", "top").toInt32(); //11802
sal_Int32 nFifthVMLShapeOutside
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[5]/bounds", "bottom").toInt32(); //16124
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[5]/bounds", "bottom")
+ .toInt32(); //16124
// Verify that the distance between the bottom of body and top of first VMLshape is around 0cm. (align=inside)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nBodyBottom - nFirstVMLShapeInside);
diff --git a/sw/qa/core/test_ToxLinkProcessor.cxx b/sw/qa/core/test_ToxLinkProcessor.cxx
index 9b690be4211a..a4bb1eac60f0 100644
--- a/sw/qa/core/test_ToxLinkProcessor.cxx
+++ b/sw/qa/core/test_ToxLinkProcessor.cxx
@@ -44,8 +44,8 @@ public:
static constexpr OUStringLiteral STYLE_NAME_2 = u"anyStyle2";
static const sal_uInt16 POOL_ID_1;
static const sal_uInt16 POOL_ID_2;
- static constexpr OUStringLiteral URL_1 = u"anyUrl1";
- static constexpr OUStringLiteral URL_2 = u"anyUrl2";
+ static constexpr OUStringLiteral URL_1 = u"#anyUrl1";
+ static constexpr OUStringLiteral URL_2 = u"#anyUrl2";
};
const sal_uInt16 ToxLinkProcessorTest::POOL_ID_1 = 42;
@@ -56,11 +56,11 @@ ToxLinkProcessorTest::NoExceptionIsThrownIfTooManyLinksAreClosed()
{
ToxLinkProcessor sut;
sut.StartNewLink(0, STYLE_NAME_1);
- sut.CloseLink(1, URL_1);
+ sut.CloseLink(1, URL_1, /*bRelative=*/true);
// fdo#85872 actually it turns out the UI does something like this
// so an exception must not be thrown!
// should not succeed either (for backward compatibility)
- sut.CloseLink(2, URL_1);
+ sut.CloseLink(2, URL_1, /*bRelative=*/true);
CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned>(sut.m_ClosedLinks.size()));
CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned>(sut.m_ClosedLinks.at(0)->mEndTextPos));
CPPUNIT_ASSERT_MESSAGE("no links are open", !sut.m_pStartedLink);
@@ -72,10 +72,10 @@ ToxLinkProcessorTest::AddingAndClosingTwoOverlappingLinksResultsInOneClosedLink(
ToxLinkProcessor sut;
sut.StartNewLink(0, STYLE_NAME_1);
sut.StartNewLink(0, STYLE_NAME_2);
- sut.CloseLink(1, URL_1);
+ sut.CloseLink(1, URL_1, /*bRelative=*/true);
// this should not cause an error, and should not succeed either
// (for backward compatibility)
- sut.CloseLink(1, URL_2);
+ sut.CloseLink(1, URL_2, /*bRelative=*/true);
CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned>(sut.m_ClosedLinks.size()));
CPPUNIT_ASSERT_MESSAGE("no links are open", !sut.m_pStartedLink);
// backward compatibility: the last start is closed by the first end
@@ -108,7 +108,7 @@ ToxLinkProcessorTest::LinkIsCreatedCorrectly()
ToxLinkProcessorWithOverriddenObtainPoolId sut;
sut.StartNewLink(0, STYLE_NAME_1);
- sut.CloseLink(1, URL_1);
+ sut.CloseLink(1, URL_1, /*bRelative=*/true);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link", OUString(STYLE_NAME_1), sut.m_ClosedLinks.at(0)->mINetFormat.GetVisitedFormat());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link", OUString(URL_1), sut.m_ClosedLinks.at(0)->mINetFormat.GetValue());
@@ -122,9 +122,9 @@ ToxLinkProcessorTest::LinkSequenceIsPreserved()
ToxLinkProcessorWithOverriddenObtainPoolId sut;
sut.StartNewLink(0, STYLE_NAME_2);
- sut.CloseLink(1, URL_2);
+ sut.CloseLink(1, URL_2, /*bRelative=*/true);
sut.StartNewLink(1, STYLE_NAME_1);
- sut.CloseLink(2, URL_1);
+ sut.CloseLink(2, URL_1, /*bRelative=*/true);
// check first closed element
CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link",
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
new file mode 100644
index 000000000000..1ac8764a0574
--- /dev/null
+++ b/sw/qa/core/tox/tox.cxx
@@ -0,0 +1,256 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/text/BibliographyDataType.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+
+#include <comphelper/propertyvalue.hxx>
+
+#include <IDocumentFieldsAccess.hxx>
+#include <authfld.hxx>
+#include <fmtfld.hxx>
+
+namespace
+{
+/// Covers sw/source/core/tox/ fixes.
+class Test : public SwModelTestBase
+{
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testAuthorityLinkClick)
+{
+ // Create a document with a bibliography reference (of type WWW) in it.
+ 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("ARJ00")),
+ comphelper::makePropertyValue("Author", OUString("Ar, J")),
+ comphelper::makePropertyValue("Title", OUString("mytitle")),
+ comphelper::makePropertyValue("Year", OUString("2020")),
+ comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf")),
+ };
+ 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);
+ // Create a bibliography table.
+ uno::Reference<text::XTextContent> xTable(
+ xFactory->createInstance("com.sun.star.text.Bibliography"), uno::UNO_QUERY);
+ xCursor->gotoEnd(/*bExpand=*/false);
+ xText->insertControlCharacter(xCursor, text::ControlCharacter::APPEND_PARAGRAPH,
+ /*bAbsorb=*/false);
+ xText->insertTextContent(xCursor, xTable, /*bAbsorb=*/false);
+
+ // Update it.
+ uno::Reference<text::XDocumentIndex> xTableIndex(xTable, uno::UNO_QUERY);
+ xTableIndex->update();
+
+ // Paragraph index: Reference, table header, table row.
+ // Portion index: ID, etc; then the URL.
+ auto aActual = getProperty<OUString>(getRun(getParagraph(3), 2), "HyperLinkURL");
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.container.NoSuchElementException
+ // i.e. the URL was not clickable and the table row was a single text portion.
+ CPPUNIT_ASSERT_EQUAL(OUString("http://www.example.com/test.pdf"), aActual);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableEntryURL)
+{
+ // Given a document with a bibliography reference (of type WWW) in it:
+ 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);
+ // Create a bibliography table.
+ uno::Reference<text::XTextContent> xTable(
+ xFactory->createInstance("com.sun.star.text.Bibliography"), uno::UNO_QUERY);
+ xCursor->gotoEnd(/*bExpand=*/false);
+ xText->insertControlCharacter(xCursor, text::ControlCharacter::APPEND_PARAGRAPH,
+ /*bAbsorb=*/false);
+ xText->insertTextContent(xCursor, xTable, /*bAbsorb=*/false);
+
+ // When updating that table:
+ uno::Reference<text::XDocumentIndex> xTableIndex(xTable, uno::UNO_QUERY);
+ xTableIndex->update();
+
+ // Then the page number from the source's URL should be stripped:
+ // Paragraph index: Reference, table header, table row.
+ // Portion index: ID, etc; then the URL.
+ auto aActual = getProperty<OUString>(getRun(getParagraph(3), 2), "HyperLinkURL");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: http://www.example.com/test.pdf
+ // - Actual : http://www.example.com/test.pdf#page=1
+ // i.e. the page number was still part of the bibliography table.
+ 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:
+ static const std::initializer_list<std::u16string_view> aURLs = {
+ u"http://www.example.com/test.pdf#page=1",
+ u"http://www.example.com/test.pdf#page=2",
+ u"http://www.example.com/test2.pdf",
+ };
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ for (const auto& rURL : aURLs)
+ {
+ 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(rURL)),
+ };
+ xField->setPropertyValue("Fields", uno::makeAny(aFields));
+ uno::Reference<text::XTextContent> xContent(xField, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
+ }
+ // Create a bibliography table.
+ uno::Reference<text::XTextContent> xTable(
+ xFactory->createInstance("com.sun.star.text.Bibliography"), uno::UNO_QUERY);
+ xCursor->gotoEnd(/*bExpand=*/false);
+ xText->insertControlCharacter(xCursor, text::ControlCharacter::APPEND_PARAGRAPH,
+ /*bAbsorb=*/false);
+ xText->insertTextContent(xCursor, xTable, /*bAbsorb=*/false);
+
+ // When updating that table:
+ uno::Reference<text::XDocumentIndex> xTableIndex(xTable, uno::UNO_QUERY);
+ xTableIndex->update();
+
+ // Then the first two fields should be merged to a single source, but not the third.
+ CPPUNIT_ASSERT_EQUAL(OUString("AT: Author, Title, , http://www.example.com/test.pdf"),
+ getParagraph(3)->getString());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: AT: Author, Title, , http://www.example.com/test2.pdf
+ // - Actual : AT: Author, Title, , http://www.example.com/test.pdf
+ // i.e. test.pdf was mentioned twice, without deduplication.
+ CPPUNIT_ASSERT_EQUAL(OUString("AT: Author, Title, , http://www.example.com/test2.pdf"),
+ getParagraph(4)->getString());
+}
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 02202d6fe8e2..ade0a9d8170b 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -287,15 +287,13 @@ void SwDocTest::testUserPerceivedCharCount()
//Grapheme example, two different unicode code-points perceived by the user as a single
//glyph
- const sal_Unicode ALEF_QAMATS [] = { 0x05D0, 0x05B8 };
- OUString sALEF_QAMATS(ALEF_QAMATS, SAL_N_ELEMENTS(ALEF_QAMATS));
+ static constexpr OUStringLiteral sALEF_QAMATS = u"\u05D0\u05B8";
sal_Int32 nGraphemeCount = pBreakIter->getGraphemeCount(sALEF_QAMATS);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Grapheme Count should be 1", static_cast<sal_Int32>(1), nGraphemeCount);
//Surrogate pair example, one single unicode code-point (U+1D11E)
//represented as two code units in UTF-16
- const sal_Unicode GCLEF[] = { 0xD834, 0xDD1E };
- OUString sGCLEF(GCLEF, SAL_N_ELEMENTS(GCLEF));
+ static constexpr OUStringLiteral sGCLEF = u"\U0001D11E";
sal_Int32 nCount = pBreakIter->getGraphemeCount(sGCLEF);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Surrogate Pair should be counted as single character", static_cast<sal_Int32>(1), nCount);
}
@@ -616,10 +614,9 @@ void SwDocTest::testSwScanner()
//See https://www.libreoffice.org/bugzilla/show_bug.cgi?id=45271
{
- const sal_Unicode IDEOGRAPHICFULLSTOP_D[] = { 0x3002, 'D' };
+ static constexpr OUStringLiteral IDEOGRAPHICFULLSTOP_D = u"\u3002D";
- m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(IDEOGRAPHICFULLSTOP_D,
- SAL_N_ELEMENTS(IDEOGRAPHICFULLSTOP_D)));
+ m_pDoc->getIDocumentContentOperations().InsertString(aPaM, IDEOGRAPHICFULLSTOP_D);
SvxLanguageItem aCJKLangItem( LANGUAGE_CHINESE_SIMPLIFIED, RES_CHRATR_CJK_LANGUAGE );
SvxLanguageItem aWestLangItem( LANGUAGE_ENGLISH_US, RES_CHRATR_LANGUAGE );
@@ -628,34 +625,31 @@ void SwDocTest::testSwScanner()
SwDocStat aDocStat;
pTextNode = aPaM.GetNode().GetTextNode();
- pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(IDEOGRAPHICFULLSTOP_D));
+ pTextNode->CountWords(aDocStat, 0, IDEOGRAPHICFULLSTOP_D.getLength());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(2), aDocStat.nChar);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(2), aDocStat.nCharExcludingSpaces);
}
{
- const sal_Unicode test[] =
- {
- 0x3053, 0x306E, 0x65E5, 0x672C, 0x8A9E, 0x306F, 0x6B63, 0x3057,
- 0x304F, 0x6570, 0x3048, 0x3089, 0x308C, 0x308B, 0x3067, 0x3057,
- 0x3087, 0x3046, 0x304B, 0x3002, 0x0041, 0x006E, 0x0064, 0x0020,
- 0x006C, 0x0065, 0x0074, 0x0027, 0x0073, 0x0020, 0x0074, 0x0068,
- 0x0072, 0x006F, 0x0077, 0x0020, 0x0073, 0x006F, 0x006D, 0x0065,
- 0x0020, 0x0045, 0x006E, 0x0067, 0x006C, 0x0069, 0x0073, 0x0068,
- 0x0020, 0x0069, 0x006E, 0x0020, 0x0074, 0x006F, 0x0020, 0x006D,
- 0x0061, 0x006B, 0x0065, 0x0020, 0x0069, 0x0074, 0x0020, 0x0069,
- 0x006E, 0x0074, 0x0065, 0x0072, 0x0065, 0x0073, 0x0074, 0x0069,
- 0x006E, 0x0067, 0x002E, 0x0020, 0x0020, 0x305D, 0x3057, 0x3066,
- 0x3001, 0x307E, 0x305F, 0x65E5, 0x672C, 0x8A9E, 0x3000, 0x3000,
- 0x3067, 0x3082, 0x4ECA, 0x56DE, 0x306F, 0x7A7A, 0x767D, 0x3092,
- 0x3000, 0x3000, 0x5165, 0x308C, 0x307E, 0x3057, 0x305F, 0x3002,
- 0x0020, 0x0020, 0x0053, 0x006F, 0x0020, 0x0068, 0x006F, 0x0077,
- 0x0020, 0x0064, 0x006F, 0x0065, 0x0073, 0x0020, 0x0074, 0x0068,
- 0x0069, 0x0073, 0x0020, 0x0064, 0x006F, 0x003F, 0x0020, 0x0020
- };
+ static constexpr OUStringLiteral test =
+ u"\u3053\u306E\u65E5\u672C\u8A9E\u306F\u6B63\u3057"
+ "\u304F\u6570\u3048\u3089\u308C\u308B\u3067\u3057"
+ "\u3087\u3046\u304B\u3002And "
+ "let's th"
+ "row some"
+ " English"
+ " in to m"
+ "ake it i"
+ "nteresti"
+ "ng. \u305D\u3057\u3066"
+ "\u3001\u307E\u305F\u65E5\u672C\u8A9E\u3000\u3000"
+ "\u3067\u3082\u4ECA\u56DE\u306F\u7A7A\u767D\u3092"
+ "\u3000\u3000\u5165\u308C\u307E\u3057\u305F\u3002"
+ " So how"
+ " does th"
+ "is do? ";
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
- m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(test,
- SAL_N_ELEMENTS(test)));
+ m_pDoc->getIDocumentContentOperations().InsertString(aPaM, test);
SvxLanguageItem aCJKLangItem( LANGUAGE_JAPANESE, RES_CHRATR_CJK_LANGUAGE );
SvxLanguageItem aWestLangItem( LANGUAGE_ENGLISH_US, RES_CHRATR_LANGUAGE );
@@ -664,7 +658,7 @@ void SwDocTest::testSwScanner()
SwDocStat aDocStat;
pTextNode = aPaM.GetNode().GetTextNode();
- pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(test));
+ pTextNode->CountWords(aDocStat, 0, test.getLength());
CPPUNIT_ASSERT_EQUAL_MESSAGE("words", static_cast<sal_uLong>(58), aDocStat.nWord);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Asian characters and Korean syllables", static_cast<sal_uLong>(43), aDocStat.nAsianWord);
CPPUNIT_ASSERT_EQUAL_MESSAGE("non-whitespace chars", static_cast<sal_uLong>(105), aDocStat.nCharExcludingSpaces);
@@ -676,34 +670,31 @@ void SwDocTest::testSwScanner()
{
SwDocStat aDocStat;
- const sal_Unicode aShouldBeThree[] = {
- 0x0053, 0x0068, 0x006F, 0x0075, 0x006C, 0x0064, 0x0020,
- 0x2018, 0x0062, 0x0065, 0x0020, 0x0074, 0x0068, 0x0072,
- 0x0065, 0x0065, 0x2019
- };
+ static constexpr OUStringLiteral aShouldBeThree =
+ u"Should "
+ "\u2018be thr"
+ "ee\u2019";
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
- m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(aShouldBeThree, SAL_N_ELEMENTS(aShouldBeThree)));
+ m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aShouldBeThree);
pTextNode = aPaM.GetNode().GetTextNode();
- pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(aShouldBeThree));
+ pTextNode->CountWords(aDocStat, 0, aShouldBeThree.getLength());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(3), aDocStat.nWord);
- const sal_Unicode aShouldBeFive[] = {
- // f r e n c h space
- 0x0046, 0x0072, 0x0065, 0x006E, 0x0063, 0x0068, 0x0020,
- // << nbsp s a v o i
- 0x00AB, 0x00A0, 0x0073, 0x0061, 0x0076, 0x006F, 0x0069,
- // r nnbsp c a l c u
- 0x0072, 0x202f, 0x0063, 0x0061, 0x006C, 0x0063, 0x0075,
- // l e r idspace >>
- 0x006C, 0x0065, 0x0072, 0x3000, 0x00BB
- };
+ static constexpr OUStringLiteral aShouldBeFive =
+ u"french "
+ // << nbsp
+ "\u00AB\u00A0savoi"
+ // nnbsp
+ "r\u202fcalcu"
+ // idspace >>
+ "ler\u3000\u00BB";
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
- m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(aShouldBeFive, SAL_N_ELEMENTS(aShouldBeFive)));
+ m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aShouldBeFive);
pTextNode = aPaM.GetNode().GetTextNode();
aDocStat.Reset();
- pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(aShouldBeFive));
+ pTextNode->CountWords(aDocStat, 0, aShouldBeFive.getLength());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(5), aDocStat.nWord);
}
@@ -846,72 +837,72 @@ void SwDocTest::testSwScanner()
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', ' '));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
- aDocStat.nCharExcludingSpaces == 12 &&
- aDocStat.nChar == 15);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(4), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(12), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(15), aDocStat.nChar);
aDocStat.Reset();
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll("X", " = "));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 5 &&
- aDocStat.nCharExcludingSpaces == 13 &&
- aDocStat.nChar == 17);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(5), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(17), aDocStat.nChar);
aDocStat.Reset();
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll("X", " _ "));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 5 &&
- aDocStat.nCharExcludingSpaces == 13 &&
- aDocStat.nChar == 17);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(5), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(17), aDocStat.nChar);
aDocStat.Reset();
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll("X", " -- "));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 5 &&
- aDocStat.nCharExcludingSpaces == 14 &&
- aDocStat.nChar == 18);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(5), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(14), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(18), aDocStat.nChar);
aDocStat.Reset();
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', '_'));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
- aDocStat.nCharExcludingSpaces == 13 &&
- aDocStat.nChar == 15);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(3), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(15), aDocStat.nChar);
aDocStat.Reset();
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', '-'));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
- aDocStat.nCharExcludingSpaces == 13 &&
- aDocStat.nChar == 15);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(3), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(15), aDocStat.nChar);
aDocStat.Reset();
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2012));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
- aDocStat.nCharExcludingSpaces == 13 &&
- aDocStat.nChar == 15);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(3), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(15), aDocStat.nChar);
aDocStat.Reset();
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2015));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
- aDocStat.nCharExcludingSpaces == 13 &&
- aDocStat.nChar == 15);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(3), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(15), aDocStat.nChar);
aDocStat.Reset();
//But default configuration should, msword-alike treat emdash
@@ -920,29 +911,28 @@ void SwDocTest::testSwScanner()
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2013));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
- aDocStat.nCharExcludingSpaces == 13 &&
- aDocStat.nChar == 15);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(4), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(15), aDocStat.nChar);
aDocStat.Reset();
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2014));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
- aDocStat.nCharExcludingSpaces == 13 &&
- aDocStat.nChar == 15);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(4), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(15), aDocStat.nChar);
aDocStat.Reset();
- const sal_Unicode aChunk[] = {' ', 0x2013, ' '};
- OUString sChunk(aChunk, SAL_N_ELEMENTS(aChunk));
+ static constexpr OUStringLiteral sChunk = u" \u2013 ";
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll("X", sChunk));
pTextNode = aPaM.GetNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
- CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
- aDocStat.nCharExcludingSpaces == 13 &&
- aDocStat.nChar == 17);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(4), aDocStat.nWord);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces);
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(17), aDocStat.nChar);
aDocStat.Reset();
}
}
@@ -1195,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
}
@@ -1588,11 +1578,15 @@ void SwDocTest::testFormulas()
// tdf#61228: Evaluating non-defined function should return an error
SwCalc aCalc(*m_pDoc);
SwSbxValue val = aCalc.Calculate("foobar()");
- CPPUNIT_ASSERT(aCalc.IsCalcError() && val.IsVoidValue() && val.IsDouble());
+ CPPUNIT_ASSERT(aCalc.IsCalcError());
+ CPPUNIT_ASSERT(val.IsVoidValue());
+ CPPUNIT_ASSERT(val.IsDouble());
CPPUNIT_ASSERT_EQUAL(DBL_MAX, val.GetDouble());
// Evaluating non-defined variable should return 0 without an error
val = aCalc.Calculate("foobar");
- CPPUNIT_ASSERT(!aCalc.IsCalcError() && val.IsVoidValue() && val.IsLong());
+ CPPUNIT_ASSERT(!aCalc.IsCalcError());
+ CPPUNIT_ASSERT(val.IsVoidValue());
+ CPPUNIT_ASSERT(val.IsLong());
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), val.GetLong());
}
@@ -2019,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/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index 8915ed808232..f84bc2ffc9bd 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -613,7 +613,7 @@ void Test::testCharStyleHighlight()
const sal_Int32 nBackColor(0xFFDBB6); //orange-y
// Always export character style's background colour as shading, never as highlighting.
- CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), false, hasProperty(xCharStyle,"CharHighlight"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(COL_TRANSPARENT), getProperty<sal_Int32>(xCharStyle,"CharHighlight"));
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), nBackColor, getProperty<sal_Int32>(xCharStyle,"CharBackColor"));
}
}
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/data/reqif-aschar-objsize.odt b/sw/qa/extras/htmlexport/data/reqif-aschar-objsize.odt
new file mode 100644
index 000000000000..6028b54a4190
--- /dev/null
+++ b/sw/qa/extras/htmlexport/data/reqif-aschar-objsize.odt
Binary files differ
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index f749c363880e..37f92c99dbd4 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -58,10 +58,14 @@ public:
TestReqIfRtfReader(SvStream& rStream);
void NextToken(int nToken) override;
bool WriteObjectData(SvStream& rOLE);
+ tools::Long GetObjw() const { return m_nObjw; }
+ tools::Long GetObjh() const { return m_nObjh; }
private:
bool m_bInObjData = false;
OStringBuffer m_aHex;
+ tools::Long m_nObjw = 0;
+ tools::Long m_nObjh = 0;
};
TestReqIfRtfReader::TestReqIfRtfReader(SvStream& rStream)
@@ -83,6 +87,12 @@ void TestReqIfRtfReader::NextToken(int nToken)
case RTF_OBJDATA:
m_bInObjData = true;
break;
+ case RTF_OBJW:
+ m_nObjw = nTokenValue;
+ break;
+ case RTF_OBJH:
+ m_nObjh = nTokenValue;
+ break;
}
}
@@ -119,6 +129,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
@@ -218,6 +265,8 @@ public:
OUString GetOlePath();
/// Parse the ole1 data out of an RTF fragment URL.
void ParseOle1FromRtfUrl(const OUString& rRtfUrl, SvMemoryStream& rOle1);
+ /// Export using the C++ HTML export filter, with xhtmlns=reqif-xhtml.
+ void ExportToReqif();
};
OUString SwHtmlDomExportTest::GetOlePath()
@@ -246,6 +295,16 @@ void SwHtmlDomExportTest::ParseOle1FromRtfUrl(const OUString& rRtfUrl, SvMemoryS
CPPUNIT_ASSERT(rOle1.Tell());
}
+void SwHtmlDomExportTest::ExportToReqif()
+{
+ 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);
+}
+
constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/htmlexport/data/";
DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testFdo81276, "fdo81276.html")
@@ -703,6 +762,34 @@ 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:
+ ExportToReqif();
+
+ // 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);
@@ -953,19 +1040,13 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testChinese)
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "reqif-chinese.odt";
mxComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument", {});
- // Export it.
- 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")),
- };
-
// Prevent parseXmlStream guess incompatible encoding and complaint.
SvxHtmlOptions& rOptions = SvxHtmlOptions::Get();
rtl_TextEncoding eOldEncoding = rOptions.GetTextEncoding();
rOptions.SetTextEncoding(RTL_TEXTENCODING_UTF8);
- xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
+ // Export it.
+ ExportToReqif();
SvMemoryStream aStream;
HtmlExportTest::wrapFragment(maTempFile, aStream);
xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
@@ -987,12 +1068,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifComment)
dispatchCommand(mxComponent, ".uno:InsertAnnotation", aPropertyValues);
// Export it.
- 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);
+ ExportToReqif();
SvMemoryStream aStream;
HtmlExportTest::wrapFragment(maTempFile, aStream);
xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
@@ -1016,12 +1092,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifFontNameSize)
xTextRange->setString("x");
// Export it.
- 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);
+ ExportToReqif();
SvMemoryStream aStream;
HtmlExportTest::wrapFragment(maTempFile, aStream);
xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
@@ -1044,12 +1115,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifParagraphAlignment)
"ParaAdjust", uno::makeAny(static_cast<sal_Int16>(style::ParagraphAdjust_RIGHT)));
// Export it.
- 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);
+ ExportToReqif();
SvMemoryStream aStream;
HtmlExportTest::wrapFragment(maTempFile, aStream);
xmlDocUniquePtr pDoc = parseXmlStream(&aStream);
@@ -1069,36 +1135,20 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PDF)
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "pdf-ole.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);
+ ExportToReqif();
OUString aRtfUrl = GetOlePath();
SvMemoryStream aOle1;
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();
@@ -1109,10 +1159,10 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PDF)
};
mxComponent
= loadFromDesktop(maTempFile.GetURL(), "com.sun.star.text.TextDocument", aLoadProperties);
- xStorable.set(mxComponent, uno::UNO_QUERY);
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
- aStoreProperties = {
+ uno::Sequence<beans::PropertyValue> aStoreProperties = {
comphelper::makePropertyValue("FilterName", OUString("writer8")),
};
xStorable->storeToURL(aTempFile.GetURL(), aStoreProperties);
@@ -1167,11 +1217,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1Paint)
// case, which has its own clsid.
CPPUNIT_ASSERT_EQUAL(aExpected.GetHexName(), aActual.GetHexName());
- aStoreProperties = {
- comphelper::makePropertyValue("FilterName", OUString("HTML (StarWriter)")),
- comphelper::makePropertyValue("FilterOptions", OUString("xhtmlns=reqif-xhtml")),
- };
- xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
+ ExportToReqif();
OUString aRtfUrl = GetOlePath();
SvMemoryStream aOle1;
ParseOle1FromRtfUrl(aRtfUrl, aOle1);
@@ -1221,12 +1267,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testMultiParaListItem)
pWrtShell->SplitNode();
pWrtShell->Insert("D");
- 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);
+ ExportToReqif();
SvMemoryStream aStream;
HtmlExportTest::wrapFragment(maTempFile, aStream);
@@ -1253,12 +1294,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testUnderlineNone)
uno::makeAny(sal_Int16(awt::FontUnderline::NONE)));
// Export 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);
+ ExportToReqif();
// Make sure that the paragraph has no explicit style, because "text-decoration: none" is
// filtered out.
@@ -1274,37 +1310,57 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PresDataNoOle2)
// Save to reqif-xhtml.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "no-ole2-pres-data.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);
+ ExportToReqif();
OUString aRtfUrl = GetOlePath();
SvMemoryStream aOle1;
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", {});
+ ExportToReqif();
+ 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_TEST_FIXTURE(SwHtmlDomExportTest, testReqifAscharObjsize)
+{
+ // Given a document with an as-char anchored embedded object:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "reqif-aschar-objsize.odt";
+ mxComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument", {});
+
+ // When exporting to reqif-xhtml:
+ ExportToReqif();
+
+ // Then make sure that the RTF snippet has the correct aspect ratio:
+ OUString aRtfUrl = GetOlePath();
+ SvMemoryStream aRtf;
+ HtmlExportTest::wrapRtfFragment(aRtfUrl, aRtf);
+ tools::SvRef<TestReqIfRtfReader> xReader(new TestReqIfRtfReader(aRtf));
+ CPPUNIT_ASSERT(xReader->CallParser() != SvParserState::Error);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 7344
+ // - Actual : 2836
+ // i.e. the aspect ratio was 1:1, while the PNG aspect ratio was correctly not 1:1.
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(7344), xReader->GetObjw());
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(4116), xReader->GetObjh());
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/htmlexport/xhtmlexport.cxx b/sw/qa/extras/htmlexport/xhtmlexport.cxx
index 85adfa2b7b49..f60d8b912fad 100644
--- a/sw/qa/extras/htmlexport/xhtmlexport.cxx
+++ b/sw/qa/extras/htmlexport/xhtmlexport.cxx
@@ -49,7 +49,7 @@ DECLARE_HTMLEXPORT_TEST(testTdf131812, "tdf131812.odt")
sal_uInt64 nLength = pStream->TellEnd();
OString aStream(read_uInt8s_ToOString(*pStream, nLength));
CPPUNIT_ASSERT(
- aStream.indexOf(".P1 { font-size:12pt; font-family:Liberation Serif; "
+ aStream.indexOf(".P1 { font-size:12pt; font-family:\'Liberation Serif\'; "
"writing-mode:horizontal-tb; direction:rtl; text-align:right ! important;}")
!= -1);
}
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/tdf138465min.docx b/sw/qa/extras/layout/data/tdf138465min.docx
new file mode 100644
index 000000000000..d576a54f281f
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf138465min.docx
Binary files differ
diff --git a/sw/qa/extras/layout/data/tdf138951.odt b/sw/qa/extras/layout/data/tdf138951.odt
new file mode 100644
index 000000000000..5cb4940bd5fe
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf138951.odt
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/data/tdf40260.odt b/sw/qa/extras/layout/data/tdf40260.odt
new file mode 100644
index 000000000000..3a9c23f547cf
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf40260.odt
Binary files differ
diff --git a/sw/qa/extras/layout/data/tdf72727.odt b/sw/qa/extras/layout/data/tdf72727.odt
new file mode 100644
index 000000000000..606ad690703e
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf72727.odt
Binary files differ
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index 253783a9e146..c8919f155c60 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -283,6 +283,37 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testRedlineShowHideFootnotePagination)
"zzz. zzz zzzz zzzz7 zzz zzz zzzzzzz zzz zzzz zzzzzzzzzzzzzz zzzzzzzzzzzz ");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testtdf138951)
+{
+ // Open the bugdoc
+ auto pDoc = createDoc("tdf138951.odt");
+
+ // Get the only shape
+ uno::Reference<drawing::XShape> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShape);
+
+ // Gather its formats: the shape and textbox
+ const SwFrameFormat* pTxFrm = SwTextBoxHelper::getOtherTextBoxFormat(xShape);
+ CPPUNIT_ASSERT(pTxFrm);
+ const SwFrameFormat* pShFrm = SwTextBoxHelper::getOtherTextBoxFormat(pTxFrm, RES_FLYFRMFMT);
+ CPPUNIT_ASSERT(pShFrm);
+
+ pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout();
+
+ // Get the bound rectangle of the textframe
+ tools::Rectangle aTxtFrmRect(pTxFrm->FindRealSdrObject()->GetLogicRect());
+
+ // Get the bound rectangle of the shape
+ tools::Rectangle aShpRect(pShFrm->FindRealSdrObject()->GetLogicRect());
+
+ // Check the anchor the same and the textbox is inside the shape
+ const bool bIsAnchTheSame
+ = *pShFrm->GetAnchor().GetContentAnchor() == *pShFrm->GetAnchor().GetContentAnchor();
+ CPPUNIT_ASSERT_MESSAGE("The anchor is different for the textbox and shape!", bIsAnchTheSame);
+ CPPUNIT_ASSERT_MESSAGE("The textbox has fallen apart!", aShpRect.IsInside(aTxtFrmRect));
+ // Without the fix the anchor differs, and the frame outside of the shape
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testRedlineNumberInNumbering)
{
SwDoc* pDoc = createDoc("tdf42748.fodt");
@@ -486,6 +517,22 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf126425)
assertXPath(pXmlDoc, "//textarray", 14);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testUnusedOLEprops)
+{
+ CPPUNIT_ASSERT(createDoc("tdf138465min.docx"));
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ CPPUNIT_ASSERT(pXmlDoc);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: >300
+ // - Actual : 142
+ // i.e. the formula squashed
+ CPPUNIT_ASSERT_GREATEREQUAL(
+ double(300),
+ getXPath(pXmlDoc, "/root/page/body/txt[2]/anchored/fly/notxt/infos/bounds", "height")
+ .toDouble());
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf123268)
{
SwDoc* pDoc = createDoc("tdf123268.odt");
@@ -667,12 +714,14 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf126244)
= getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/font[5]",
"orientation")
.toInt32();
- CPPUNIT_ASSERT(nRotation >= 899 && nRotation <= 900);
+ CPPUNIT_ASSERT(nRotation >= 899);
+ CPPUNIT_ASSERT(nRotation <= 900);
// Test the third level of vertical category axis labels orientation. The third level orientation should be vertical.
nRotation = getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/font[7]",
"orientation")
.toInt32();
- CPPUNIT_ASSERT(nRotation >= 899 && nRotation <= 900);
+ CPPUNIT_ASSERT(nRotation >= 899);
+ CPPUNIT_ASSERT(nRotation <= 900);
}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf127304)
@@ -690,7 +739,8 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf127304)
= getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/font[1]",
"orientation")
.toInt32();
- CPPUNIT_ASSERT(nRotation >= 899 && nRotation <= 900);
+ CPPUNIT_ASSERT(nRotation >= 899);
+ CPPUNIT_ASSERT(nRotation <= 900);
// Test the second level of horizontal category axis labels orientation. The second level orientation should be horizontal.
assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/font[5]", "orientation",
"0");
@@ -775,6 +825,28 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf124796)
"15");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf72727)
+{
+ SwDoc* pDoc = createDoc("tdf72727.odt");
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // Dump the rendering of the first page as an XML file.
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 1
+ // - Actual : Series1
+ assertXPathContent(pXmlDoc, "/metafile/push/push/push/push[3]/push/push/push/textarray[1]/text",
+ "1");
+ assertXPathContent(pXmlDoc, "/metafile/push/push/push/push[3]/push/push/push/textarray[2]/text",
+ "2");
+ assertXPathContent(pXmlDoc, "/metafile/push/push/push/push[3]/push/push/push/textarray[3]/text",
+ "3");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf130969)
{
SwDoc* pDoc = createDoc("tdf130969.docx");
@@ -791,6 +863,24 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf130969)
pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/textarray[5]/text", "0.35781");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf40260)
+{
+ SwDoc* pDoc = createDoc("tdf40260.odt");
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: f(x) = 1.26510397865547E-06 x − 5.95245604996327E-12
+ // - Actual : f(x) = 0 x − 0
+ assertXPathContent(
+ pXmlDoc, "/metafile/push/push/push/push[3]/push/push/push/textarray[19]/text",
+ "f(x) = 1.26510397865547E-06 x " + OUStringChar(u'\x2212') + " 5.95245604996327E-12");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf129054)
{
SwDoc* pDoc = createDoc("tdf129054.docx");
@@ -1690,9 +1780,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf122607_regression)
// inline the loading because currently properties can't be passed...
mxComponent = loadFromDesktop(url, "com.sun.star.text.TextDocument",
comphelper::containerToSequence(aFilterOptions));
-
- CPPUNIT_ASSERT(mxComponent.is());
-
uno::Sequence<beans::PropertyValue> props(comphelper::InitPropertySequence({
{ "FilterName", uno::Any(OUString("writer_pdf_Export")) },
}));
@@ -1895,7 +1982,8 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf123651)
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
// Without the accompanying fix in place, this test would have failed with 'Expected: 7639;
// Actual: 12926'. The shape was below the second "Lorem ipsum" text, not above it.
- const sal_Int32 nTopValue = getXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds", "top").toInt32();
+ const sal_Int32 nTopValue
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds", "top").toInt32();
CPPUNIT_ASSERT_DOUBLES_EQUAL(7639, nTopValue, 10);
}
@@ -1979,6 +2067,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.
@@ -2282,9 +2403,10 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf124601b)
createDoc("tdf124601b.doc");
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
- sal_Int32 nFlyTop = getXPath(pXmlDoc, "//fly/infos/bounds", "top").toInt32();
- sal_Int32 nFlyLeft = getXPath(pXmlDoc, "//fly/infos/bounds", "left").toInt32();
- sal_Int32 nFlyRight = nFlyLeft + getXPath(pXmlDoc, "//fly/infos/bounds", "width").toInt32();
+ sal_Int32 nFlyTop = getXPath(pXmlDoc, "//anchored/fly/infos/bounds", "top").toInt32();
+ sal_Int32 nFlyLeft = getXPath(pXmlDoc, "//anchored/fly/infos/bounds", "left").toInt32();
+ sal_Int32 nFlyRight
+ = nFlyLeft + getXPath(pXmlDoc, "//anchored/fly/infos/bounds", "width").toInt32();
sal_Int32 nSecondRowTop = getXPath(pXmlDoc, "//tab/row[2]/infos/bounds", "top").toInt32();
sal_Int32 nLastCellLeft
= getXPath(pXmlDoc, "//tab/row[1]/cell[5]/infos/bounds", "left").toInt32();
@@ -2545,7 +2667,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testWriterImageNoCapture)
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
CPPUNIT_ASSERT(pXmlDoc);
sal_Int32 nPageLeft = getXPath(pXmlDoc, "//page/infos/bounds", "left").toInt32();
- sal_Int32 nImageLeft = getXPath(pXmlDoc, "//fly/infos/bounds", "left").toInt32();
+ sal_Int32 nImageLeft = getXPath(pXmlDoc, "//anchored/fly/infos/bounds", "left").toInt32();
// Without the accompanying fix in place, this test would have failed with:
// - Expected less than: 284
// - Actual : 284
@@ -2621,16 +2743,18 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf124423)
{
createDoc("tdf124423.docx");
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
- sal_Int32 nFly1Width = getXPath(pXmlDoc, "(//fly)[1]/infos/prtBounds", "width").toInt32();
- sal_Int32 nFly2Width = getXPath(pXmlDoc, "(//fly)[2]/infos/prtBounds", "width").toInt32();
+ sal_Int32 nFly1Width
+ = getXPath(pXmlDoc, "(//anchored/fly)[1]/infos/prtBounds", "width").toInt32();
+ sal_Int32 nFly2Width
+ = getXPath(pXmlDoc, "(//anchored/fly)[2]/infos/prtBounds", "width").toInt32();
sal_Int32 nPageWidth = getXPath(pXmlDoc, "//page/infos/prtBounds", "width").toInt32();
CPPUNIT_ASSERT_EQUAL(nPageWidth, nFly2Width);
CPPUNIT_ASSERT_LESS(nPageWidth / 2, nFly1Width);
createDoc("tdf124423.odt");
pXmlDoc = parseLayoutDump();
- nFly1Width = getXPath(pXmlDoc, "(//fly)[1]/infos/prtBounds", "width").toInt32();
- nFly2Width = getXPath(pXmlDoc, "(//fly)[2]/infos/prtBounds", "width").toInt32();
+ nFly1Width = getXPath(pXmlDoc, "(//anchored/fly)[1]/infos/prtBounds", "width").toInt32();
+ nFly2Width = getXPath(pXmlDoc, "(//anchored/fly)[2]/infos/prtBounds", "width").toInt32();
nPageWidth = getXPath(pXmlDoc, "//page/infos/prtBounds", "width").toInt32();
CPPUNIT_ASSERT_LESS(nPageWidth / 2, nFly2Width);
CPPUNIT_ASSERT_LESS(nPageWidth / 2, nFly1Width);
@@ -2649,7 +2773,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);
@@ -2681,9 +2805,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf135035)
{
createDoc("tdf135035.docx");
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
- sal_Int32 nFly1Width = getXPath(pXmlDoc, "(//fly)[1]/infos/prtBounds", "width").toInt32();
- sal_Int32 nFly2Width = getXPath(pXmlDoc, "(//fly)[2]/infos/prtBounds", "width").toInt32();
- sal_Int32 nFly3Width = getXPath(pXmlDoc, "(//fly)[3]/infos/prtBounds", "width").toInt32();
+ sal_Int32 nFly1Width
+ = getXPath(pXmlDoc, "(//anchored/fly)[1]/infos/prtBounds", "width").toInt32();
+ sal_Int32 nFly2Width
+ = getXPath(pXmlDoc, "(//anchored/fly)[2]/infos/prtBounds", "width").toInt32();
+ sal_Int32 nFly3Width
+ = getXPath(pXmlDoc, "(//anchored/fly)[3]/infos/prtBounds", "width").toInt32();
sal_Int32 nParentWidth = getXPath(pXmlDoc, "(//txt)[1]/infos/prtBounds", "width").toInt32();
CPPUNIT_ASSERT_EQUAL(nParentWidth, nFly2Width);
CPPUNIT_ASSERT_EQUAL(nParentWidth, nFly3Width);
@@ -2691,9 +2818,9 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf135035)
createDoc("tdf135035.odt");
pXmlDoc = parseLayoutDump();
- nFly1Width = getXPath(pXmlDoc, "(//fly)[1]/infos/prtBounds", "width").toInt32();
- nFly2Width = getXPath(pXmlDoc, "(//fly)[2]/infos/prtBounds", "width").toInt32();
- nFly3Width = getXPath(pXmlDoc, "(//fly)[3]/infos/prtBounds", "width").toInt32();
+ nFly1Width = getXPath(pXmlDoc, "(//anchored/fly)[1]/infos/prtBounds", "width").toInt32();
+ nFly2Width = getXPath(pXmlDoc, "(//anchored/fly)[2]/infos/prtBounds", "width").toInt32();
+ nFly3Width = getXPath(pXmlDoc, "(//anchored/fly)[3]/infos/prtBounds", "width").toInt32();
nParentWidth = getXPath(pXmlDoc, "(//txt)[1]/infos/prtBounds", "width").toInt32();
CPPUNIT_ASSERT_LESS(nParentWidth / 2, nFly2Width);
CPPUNIT_ASSERT_LESS(nParentWidth / 2, nFly1Width);
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index 824c4bbd60e5..67fb47fe6996 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -247,7 +247,6 @@ public:
std::cout << filename << ",";
mnStartTime = osl_getGlobalTimer();
mxComponent = loadFromDesktop(msMailMergeOutputURL + "/" + filename, "com.sun.star.text.TextDocument");
- CPPUNIT_ASSERT( mxComponent.is());
OString name2 = OUStringToOString( filename, RTL_TEXTENCODING_UTF8 );
discardDumpedLayout();
if (mustCalcLayoutOf(name2.getStr()))
@@ -397,7 +396,7 @@ DECLARE_FILE_MAILMERGE_TEST(testMissingDefaultLineColor, "missing-default-line-c
executeMailMerge();
// The document was created by LO version which didn't write out the default value for line color
// (see XMLGraphicsDefaultStyle::SetDefaults()).
- uno::Reference<beans::XPropertySet> xPropertySet(getShape(4), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(5), uno::UNO_QUERY);
// Lines do not have a line color.
CPPUNIT_ASSERT( !xPropertySet->getPropertySetInfo()->hasPropertyByName( "LineColor" ));
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
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
new file mode 100644
index 000000000000..a047ecaa3353
--- /dev/null
+++ 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/tdf115815.odt b/sw/qa/extras/odfexport/data/tdf115815.odt
new file mode 100644
index 000000000000..7c2aad0da638
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf115815.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/tdf140437.odt b/sw/qa/extras/odfexport/data/tdf140437.odt
new file mode 100644
index 000000000000..8ed9ee77ce8f
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf140437.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 15704c8eeaad..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());
@@ -490,6 +533,19 @@ DECLARE_ODFEXPORT_TEST(testredlineTextFrame, "redlineTextFrame.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
}
+DECLARE_ODFEXPORT_TEST(testTdf140437, "tdf140437.odt")
+{
+ // Without the fix in place, the document would have failed to load
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // at least one field should be detected
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+}
+
DECLARE_ODFEXPORT_TEST(testTdf131621, "tdf131621.ott")
{
CPPUNIT_ASSERT_EQUAL(12, getShapes());
@@ -767,6 +823,45 @@ DECLARE_ODFEXPORT_TEST(testFdo60769, "fdo60769.odt")
}
}
+DECLARE_ODFEXPORT_TEST(testTdf115815, "tdf115815.odt")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // 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);
+}
+
DECLARE_ODFEXPORT_TEST(testFdo58949, "fdo58949.docx")
{
/*
@@ -1821,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());
@@ -1833,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);
@@ -1867,7 +2237,6 @@ DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt")
CPPUNIT_ASSERT(bHasBitmap);
}
}
-#endif
DECLARE_ODFEXPORT_TEST(testTableStyles1, "table_styles_1.odt")
{
@@ -2686,5 +3055,18 @@ DECLARE_ODFEXPORT_EXPORTONLY_TEST(tdf135942, "nestedTableInFooter.odt")
assertXPath(pXmlDoc, "/office:document-styles/office:automatic-styles/style:style[@style:family='table']", 2);
}
+DECLARE_ODFEXPORT_TEST(testGutterLeft, "gutter-left.odt")
+{
+ uno::Reference<beans::XPropertySet> xPageStyle;
+ getStyles("PageStyles")->getByName("Standard") >>= xPageStyle;
+ sal_Int32 nGutterMargin{};
+ xPageStyle->getPropertyValue("GutterMargin") >>= nGutterMargin;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1270
+ // - Actual : 0
+ // i.e. gutter margin was lost.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), nGutterMargin);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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/CommentDone.docx b/sw/qa/extras/ooxmlexport/data/CommentDone.docx
new file mode 100644
index 000000000000..1ce5993d440b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/CommentDone.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/controlshape.fodt b/sw/qa/extras/ooxmlexport/data/controlshape.fodt
new file mode 100644
index 000000000000..81a71092407c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/controlshape.fodt
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+ <style:font-face style:name="Lucida Sans Unicode" svg:font-family="&apos;Lucida Sans Unicode&apos;" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:font-size="11pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" style:line-height-at-least="0.46cm"/>
+ </style:style>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Arial1" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Lucida Sans Unicode" style:font-family-asian="&apos;Lucida Sans Unicode&apos;" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </style:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
+ <style:text-properties fo:font-size="115%" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
+ <style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
+ <style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+ <style:style style:name="Frame" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ </text:outline-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Tabelle1" style:family="table" style:master-page-name="First_20_Page">
+ <style:table-properties style:width="19.396cm" fo:margin-left="-1.642cm" style:page-number="auto" table:align="left" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="Tabelle1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="19.396cm"/>
+ </style:style>
+ <style:style style:name="Tabelle1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Tabelle1.A1" style:family="table-cell">
+ <style:table-cell-properties style:vertical-align="top" fo:padding="0cm" fo:border="none" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties fo:margin-left="0.002cm" fo:margin-right="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="baseline" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" style:flow-with-text="true"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="baseline" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" fo:background-color="transparent" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" draw:fill="none" draw:fill-color="#99ccff" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <office:forms form:automatic-focus="false" form:apply-design-mode="false">
+ <form:form form:name="WW-Standard" form:apply-filter="true" form:control-implementation="ooo:com.sun.star.form.component.Form" office:target-frame="">
+ <form:properties>
+ <form:property form:property-name="PropertyChangeNotificationEnabled" office:value-type="boolean" office:boolean-value="true"/>
+ <form:property form:property-name="TargetURL" office:value-type="string" office:string-value=""/>
+ </form:properties>
+ <form:checkbox form:name="Kontrollkästchen1" form:control-implementation="ooo:com.sun.star.form.component.CheckBox" xml:id="control1" form:id="control1" form:input-required="false" form:state="checked" form:current-state="checked" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="ControlTypeinMSO" office:value-type="float" office:value="0"/>
+ <form:property form:property-name="DefaultControl" office:value-type="string" office:string-value="com.sun.star.form.control.CheckBox"/>
+ <form:property form:property-name="ObjIDinMSO" office:value-type="float" office:value="65535"/>
+ <form:property form:property-name="SecondaryRefValue" office:value-type="string" office:string-value=""/>
+ </form:properties>
+ </form:checkbox>
+ </form:form>
+ </office:forms>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <table:table table:name="Tabelle1" table:style-name="Tabelle1">
+ <table:table-column table:style-name="Tabelle1.A"/>
+ <table:table-row table:style-name="Tabelle1.1">
+ <table:table-cell table:style-name="Tabelle1.A1" office:value-type="string">
+ <text:p>
+ <draw:frame draw:style-name="fr1" draw:name="Rahmen2" text:anchor-type="as-char" svg:width="7.959cm" draw:z-index="0">
+ <draw:text-box fo:min-height="0.041cm">
+ <text:p>
+ <draw:control text:anchor-type="as-char" draw:z-index="1" draw:name="Shape1" draw:style-name="gr1" svg:width="0.318cm" svg:height="0.318cm" draw:control="control1"/>
+ </text:p>
+ </draw:text-box>
+ </draw:frame>
+ </text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/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/footer-margin-lost.docx b/sw/qa/extras/ooxmlexport/data/footer-margin-lost.docx
new file mode 100644
index 000000000000..d6a9d7bd8df9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/footer-margin-lost.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/gutter-left.docx b/sw/qa/extras/ooxmlexport/data/gutter-left.docx
new file mode 100644
index 000000000000..4dc1cbf615f7
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/gutter-left.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/gutter-top.docx b/sw/qa/extras/ooxmlexport/data/gutter-top.docx
new file mode 100644
index 000000000000..d48cb2846287
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/gutter-top.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx b/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx
new file mode 100644
index 000000000000..d6b28e5cbce2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/shape-atpage-in-table.fodt b/sw/qa/extras/ooxmlexport/data/shape-atpage-in-table.fodt
new file mode 100644
index 000000000000..42c9c7790509
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/shape-atpage-in-table.fodt
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+ <style:font-face style:name="Lucida Sans Unicode" svg:font-family="&apos;Lucida Sans Unicode&apos;" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties fo:font-size="11pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" style:line-height-at-least="0.46cm"/>
+ </style:style>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Arial1" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Lucida Sans Unicode" style:font-family-asian="&apos;Lucida Sans Unicode&apos;" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+ </style:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
+ <style:text-properties fo:font-size="115%" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
+ <style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
+ <style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+ <style:style style:name="Frame" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:min-label-distance="0.381cm"/>
+ </text:outline-level-style>
+ </text:outline-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Tabelle1" style:family="table" style:master-page-name="First_20_Page">
+ <style:table-properties style:width="19.396cm" fo:margin-left="-1.642cm" style:page-number="auto" table:align="left" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="Tabelle1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="19.396cm"/>
+ </style:style>
+ <style:style style:name="Tabelle1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Tabelle1.A1" style:family="table-cell">
+ <style:table-cell-properties style:vertical-align="top" fo:padding="0cm" fo:border="none" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:stroke="none" draw:fill="none" draw:fill-color="#ffffff" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" draw:auto-grow-width="false" fo:padding-top="0.1in" fo:padding-bottom="0.1in" fo:padding-left="0.05in" fo:padding-right="0.05in" fo:wrap-option="wrap" draw:shadow="hidden" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ </style:style>
+ <style:style style:name="P54" style:family="paragraph">
+ <loext:graphic-properties draw:fill="none" draw:fill-color="#ffffff"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ <style:text-properties fo:color="#000000" style:font-name="Arial1" fo:font-size="7pt" fo:language="de" fo:country="DE" style:font-name-asian="Arial1" style:font-size-asian="7pt" style:font-name-complex="Arial1" style:font-size-complex="7pt" style:language-complex="ar" style:country-complex="SA"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" fo:background-color="transparent" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" draw:fill="none" draw:fill-color="#99ccff" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <office:forms form:automatic-focus="false" form:apply-design-mode="false">
+ <form:form form:name="WW-Standard" form:apply-filter="true" form:control-implementation="ooo:com.sun.star.form.component.Form" office:target-frame="">
+ <form:properties>
+ <form:property form:property-name="PropertyChangeNotificationEnabled" office:value-type="boolean" office:boolean-value="true"/>
+ <form:property form:property-name="TargetURL" office:value-type="string" office:string-value=""/>
+ </form:properties>
+ <form:checkbox form:name="Kontrollkästchen1" form:control-implementation="ooo:com.sun.star.form.component.CheckBox" xml:id="control1" form:id="control1" form:input-required="false" form:state="checked" form:current-state="checked" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="ControlTypeinMSO" office:value-type="float" office:value="0"/>
+ <form:property form:property-name="DefaultControl" office:value-type="string" office:string-value="com.sun.star.form.control.CheckBox"/>
+ <form:property form:property-name="ObjIDinMSO" office:value-type="float" office:value="65535"/>
+ <form:property form:property-name="SecondaryRefValue" office:value-type="string" office:string-value=""/>
+ </form:properties>
+ </form:checkbox>
+ </form:form>
+ </office:forms>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <draw:frame text:anchor-type="page" text:anchor-page-number="1" draw:z-index="0" draw:name="Shape1" draw:style-name="gr2" draw:text-style-name="P54" svg:width="2.3213in" svg:height="0.3776in" draw:transform="rotate (1.5707963267949) translate (0.364583333333333in 10.65in)">
+ <draw:text-box>
+ <text:p text:style-name="P53">
+ ABC DEF GHI
+ </text:p>
+ </draw:text-box>
+ </draw:frame>
+ <table:table table:name="Tabelle1" table:style-name="Tabelle1">
+ <table:table-column table:style-name="Tabelle1.A"/>
+ <table:table-row table:style-name="Tabelle1.1">
+ <table:table-cell table:style-name="Tabelle1.A1" office:value-type="string">
+ <text:p>
+ </text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/data/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/tdf121666_lostPage.docx b/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx
new file mode 100644
index 000000000000..195f574d1c5d
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf121666_lostPage.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124678_no_leading_paragraph.odt b/sw/qa/extras/ooxmlexport/data/tdf124678_no_leading_paragraph.odt
new file mode 100644
index 000000000000..a694ff613633
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124678_no_leading_paragraph.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf124678_with_leading_paragraph.odt b/sw/qa/extras/ooxmlexport/data/tdf124678_with_leading_paragraph.odt
new file mode 100644
index 000000000000..cb14c8ea4df3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf124678_with_leading_paragraph.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/