summaryrefslogtreecommitdiff
path: root/sw/qa/core
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/core')
-rw-r--r--sw/qa/core/Test-BigPtrArray.cxx96
-rw-r--r--sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx368
-rw-r--r--sw/qa/core/accessibilitycheck/data/AccessibilityTests1.odtbin20915 -> 25882 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/AccessibilityTests_NumberingCheck.odtbin0 -> 14373 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/BackgroundImageTest.odtbin0 -> 8263 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/FakeCaptionTest.odtbin0 -> 12314 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/FakeFootnoteTest.odtbin0 -> 8875 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/HighlightTest.odtbin0 -> 8551 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/HyperlinkTest.odtbin0 -> 8663 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/LinkedImageTest.fodt18
-rw-r--r--sw/qa/core/accessibilitycheck/data/NewlineTest.odtbin0 -> 8609 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/OnlineCheck.odtbin0 -> 11226 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/ParagraphTest.odtbin0 -> 8330 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/SpaceTest.odtbin0 -> 8565 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/TOCHyperlinkTest.odtbin0 -> 26107 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/TableFormattingTest.odtbin0 -> 9111 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/Tabs-in-TOC.odtbin0 -> 15284 bytes
-rw-r--r--sw/qa/core/accessibilitycheck/data/TabsTest.odtbin0 -> 9333 bytes
-rw-r--r--sw/qa/core/attr/attr.cxx101
-rw-r--r--sw/qa/core/attr/data/attr-set.docxbin0 -> 11582 bytes
-rw-r--r--sw/qa/core/crsr/crsr.cxx146
-rw-r--r--sw/qa/core/data/README16
-rw-r--r--sw/qa/core/data/doc/tdf124937.docbin172032 -> 0 bytes
-rw-r--r--sw/qa/core/data/doc/testVba.docbin28672 -> 0 bytes
-rw-r--r--sw/qa/core/data/docm/testDocumentRange.docmbin0 -> 24459 bytes
-rw-r--r--sw/qa/core/data/docm/testFind.docmbin0 -> 25510 bytes
-rw-r--r--sw/qa/core/data/docm/testFontColor.docmbin0 -> 22421 bytes
-rw-r--r--sw/qa/core/data/docm/testModernVBA.docmbin0 -> 32970 bytes
-rw-r--r--sw/qa/core/data/docm/testModernVBADelete.docmbin0 -> 45616 bytes
-rw-r--r--sw/qa/core/data/docm/testParagraphFormat.docmbin0 -> 36983 bytes
-rw-r--r--sw/qa/core/data/docm/testSentences.docmbin0 -> 20775 bytes
-rw-r--r--sw/qa/core/data/docm/testTables.docmbin0 -> 28077 bytes
-rw-r--r--sw/qa/core/data/docm/testVBA.docmbin0 -> 32005 bytes
-rw-r--r--sw/qa/core/data/docm/testWords.docmbin0 -> 19930 bytes
-rw-r--r--sw/qa/core/data/html/pass/ofz-msan-1.htmlbin0 -> 14354 bytes
-rw-r--r--sw/qa/core/data/html/pass/ofz39850-1.htmlbin0 -> 27040 bytes
-rw-r--r--sw/qa/core/data/html/pass/ofz40593-1.htmlbin0 -> 5192 bytes
-rw-r--r--sw/qa/core/data/html/pass/ofz40766-1.htmlbin0 -> 6376 bytes
-rw-r--r--sw/qa/core/data/html/pass/ofz43310-1.htmlbin0 -> 58285 bytes
-rw-r--r--sw/qa/core/data/html/pass/ofz5007-1.html1
-rw-r--r--sw/qa/core/data/html/pass/ofz53680-1.htmlbin0 -> 9727 bytes
-rw-r--r--sw/qa/core/data/odt/tdf151846.odtbin0 -> 10824 bytes
-rw-r--r--sw/qa/core/data/ooxml/fail/LIBREOFFICE-DBDAZAEC.docxbin0 -> 89419 bytes
-rw-r--r--sw/qa/core/data/ooxml/fail/ofz37458-1.docxbin0 -> 7745 bytes
-rw-r--r--sw/qa/core/data/ooxml/pass/fill.docxbin12619 -> 0 bytes
-rw-r--r--sw/qa/core/data/rtf/fail/forcepoint-4.rtf4
-rw-r--r--sw/qa/core/data/rtf/fail/forcepoint-82.rtf28
-rw-r--r--sw/qa/core/data/rtf/pass/forcepoint-105.rtf178
-rw-r--r--sw/qa/core/data/rtf/pass/forcepoint-3.rtf2
-rw-r--r--sw/qa/core/data/rtf/pass/forcepoint-96.rtf8
-rw-r--r--sw/qa/core/data/rtf/pass/forcepoint104.rtf571
-rw-r--r--sw/qa/core/data/rtf/pass/forcepoint110.rtfbin0 -> 7776 bytes
-rw-r--r--sw/qa/core/data/ww5/pass/ooo37322-1-WW2.docbin0 -> 5559 bytes
-rw-r--r--sw/qa/core/data/ww6/fail/ofz45140-1.docbin0 -> 4009 bytes
-rw-r--r--sw/qa/core/data/ww6/pass/ofz34898-1.docbin0 -> 4085 bytes
-rw-r--r--sw/qa/core/data/ww6/pass/ofz41398-1.docbin0 -> 3291 bytes
-rw-r--r--sw/qa/core/data/ww6/pass/ofz42330-1.docbin0 -> 3275 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/ofz34749-1.docbin0 -> 49370 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/ofz38011-1.docbin0 -> 63022 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/ofz46457-1.docbin0 -> 17450 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/ofz47205-1.docbin0 -> 28038 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/ofz53457-1.docbin0 -> 17454 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/ofz57592-1.docbin0 -> 42913 bytes
-rw-r--r--sw/qa/core/doc/data/bookmark-delete-redline.docbin0 -> 66048 bytes
-rw-r--r--sw/qa/core/doc/data/copy-bookmarks.docxbin0 -> 24556 bytes
-rw-r--r--sw/qa/core/doc/data/floating-table-dummy-text.docxbin0 -> 28067 bytes
-rw-r--r--sw/qa/core/doc/data/header-footer-delete.docxbin0 -> 27286 bytes
-rw-r--r--sw/qa/core/doc/data/textbox-makeflyframe.docxbin0 -> 25642 bytes
-rw-r--r--sw/qa/core/doc/doc.cxx510
-rw-r--r--sw/qa/core/docnode/data/tdf150086.docxbin0 -> 16321 bytes
-rw-r--r--sw/qa/core/docnode/data/tdf156267.docxbin0 -> 103390 bytes
-rw-r--r--sw/qa/core/docnode/docnode.cxx41
-rw-r--r--sw/qa/core/draw/data/sdt-textbox-header.docxbin0 -> 30694 bytes
-rw-r--r--sw/qa/core/draw/data/tdf107727_FrameBorder.odtbin0 -> 11265 bytes
-rw-r--r--sw/qa/core/draw/data/textbox-undo-ordnum.docxbin0 -> 21223 bytes
-rw-r--r--sw/qa/core/draw/draw.cxx104
-rw-r--r--sw/qa/core/edit/data/delete-sel-normalize.odtbin0 -> 9769 bytes
-rw-r--r--sw/qa/core/edit/data/redline-hidden.fodt32
-rw-r--r--sw/qa/core/edit/edit.cxx86
-rw-r--r--sw/qa/core/fields/data/chapter_field_followedby.odtbin0 -> 11183 bytes
-rw-r--r--sw/qa/core/fields/data/styleref-flags.docxbin0 -> 23218 bytes
-rw-r--r--sw/qa/core/fields/data/styleref.odtbin0 -> 40280 bytes
-rw-r--r--sw/qa/core/fields/data/suppress-non-numerical.docxbin0 -> 17046 bytes
-rw-r--r--sw/qa/core/fields/data/tdf143424.odtbin0 -> 10600 bytes
-rw-r--r--sw/qa/core/fields/data/tdf86790.docxbin0 -> 15679 bytes
-rw-r--r--sw/qa/core/fields/fields.cxx484
-rw-r--r--sw/qa/core/filters-test.cxx28
-rw-r--r--sw/qa/core/filters-test2.cxx143
-rw-r--r--sw/qa/core/frmedt/data/floating-table-caption.docxbin0 -> 22947 bytes
-rw-r--r--sw/qa/core/frmedt/frmedt.cxx180
-rw-r--r--sw/qa/core/header_footer/HeaderFooterTest.cxx1334
-rw-r--r--sw/qa/core/header_footer/data/DoubleFirstLeftRight.docxbin0 -> 11824 bytes
-rw-r--r--sw/qa/core/header_footer/data/DoubleFirstLeftRight.odtbin0 -> 12626 bytes
-rw-r--r--sw/qa/core/header_footer/data/FirstPageHeaderShape.docxbin0 -> 6189 bytes
-rw-r--r--sw/qa/core/header_footer/data/FirstPageHeaderShape.odtbin0 -> 9647 bytes
-rw-r--r--sw/qa/core/header_footer/data/SimpleFirst.docxbin0 -> 5543 bytes
-rw-r--r--sw/qa/core/header_footer/data/SimpleFirst.odtbin0 -> 9468 bytes
-rw-r--r--sw/qa/core/header_footer/data/SimpleFirstLeftRight.docxbin0 -> 8450 bytes
-rw-r--r--sw/qa/core/header_footer/data/SimpleFirstLeftRight.odtbin0 -> 10754 bytes
-rw-r--r--sw/qa/core/header_footer/data/SimpleLeftRight.docxbin0 -> 5531 bytes
-rw-r--r--sw/qa/core/header_footer/data/SimpleLeftRight.odtbin0 -> 9601 bytes
-rw-r--r--sw/qa/core/header_footer/data/TestFirstFooterDisabled.docxbin0 -> 85485 bytes
-rw-r--r--sw/qa/core/header_footer/data/TestPageStyleOnlyLeft.docxbin0 -> 10191 bytes
-rw-r--r--sw/qa/core/header_footer/data/bnc519228_odd-breaksB.docxbin0 -> 13674 bytes
-rw-r--r--sw/qa/core/header_footer/data/bnc875718.docxbin0 -> 7369 bytes
-rw-r--r--sw/qa/core/header_footer/data/bnc884615-mso-position.docxbin0 -> 7751 bytes
-rw-r--r--sw/qa/core/header_footer/data/cont-sect-break-header-footer.docxbin0 -> 18294 bytes
-rw-r--r--sw/qa/core/header_footer/data/fdo64238_a.docxbin0 -> 16401 bytes
-rw-r--r--sw/qa/core/header_footer/data/fdo64238_b.docxbin0 -> 14359 bytes
-rw-r--r--sw/qa/core/header_footer/data/fdo65655.docxbin0 -> 13760 bytes
-rw-r--r--sw/qa/core/header_footer/data/fdo66145.docxbin0 -> 16245 bytes
-rw-r--r--sw/qa/core/header_footer/data/first-header-footer.docbin0 -> 23552 bytes
-rw-r--r--sw/qa/core/header_footer/data/first-header-footer.docxbin0 -> 21998 bytes
-rw-r--r--sw/qa/core/header_footer/data/first-header-footer.odtbin0 -> 9644 bytes
-rw-r--r--sw/qa/core/header_footer/data/first-header-footerB.odtbin0 -> 11341 bytes
-rw-r--r--sw/qa/core/header_footer/data/headerfooter-link-to-prev.docxbin0 -> 18770 bytes
-rw-r--r--sw/qa/core/header_footer/data/n750935.docxbin0 -> 57750 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf112694.docxbin0 -> 14741 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf113849_evenAndOddHeaders.odtbin0 -> 24355 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf118393.odtbin0 -> 14208 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf127778.docxbin0 -> 23220 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf129582.docxbin0 -> 129975 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf135216_evenOddFooter.docxbin0 -> 10784 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf135216_evenOddFooter.odtbin0 -> 12457 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf145998_firstHeader.odtbin0 -> 9691 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf57155.docxbin0 -> 27287 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf69635.docxbin0 -> 6042 bytes
-rw-r--r--sw/qa/core/header_footer/data/tdf79639.docxbin0 -> 18409 bytes
-rw-r--r--sw/qa/core/layout/data/bad-split-section.odtbin0 -> 29305 bytes
-rw-r--r--sw/qa/core/layout/data/birt_min.odtbin0 -> 20194 bytes
-rw-r--r--sw/qa/core/layout/data/bullet.pngbin0 -> 351 bytes
-rw-r--r--sw/qa/core/layout/data/double-border-horizontal.docxbin0 -> 12250 bytes
-rw-r--r--sw/qa/core/layout/data/double-border-vertical.docxbin0 -> 12253 bytes
-rw-r--r--sw/qa/core/layout/data/double-page-border.docxbin0 -> 12053 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-2cols.docxbin0 -> 31941 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-3pages.docxbin0 -> 13014 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-anchor-keep-with-next.docxbin0 -> 12225 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-compat14-body.docxbin0 -> 27894 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-compat14-nosplit.docxbin0 -> 26165 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-compat14.docxbin0 -> 28497 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-del-empty.docxbin0 -> 36317 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-deleted-anchor.docxbin0 -> 41531 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-footer-2rows.docxbin0 -> 31993 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-footer.docxbin0 -> 31661 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-from-bottom.docxbin0 -> 59718 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-header.docxbin0 -> 31604 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-hori-pos.docxbin0 -> 12432 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-in-inlinetable.docxbin0 -> 18597 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-in-inltbl-in-sect.docxbin0 -> 18625 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-in-section.docxbin0 -> 16073 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-in-text-section.docxbin0 -> 12452 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-model-position-for-view-point-correction.docxbin0 -> 12696 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-move-master.docxbin0 -> 13635 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-multi-col.docxbin0 -> 12525 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-negative-height.docxbin0 -> 39432 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-nested-overlap.odtbin0 -> 11681 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-nested-rowspan.docxbin0 -> 25940 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-nested.odtbin0 -> 11635 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-next-leaf-in-section.docxbin0 -> 24632 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-next-row-invalidate-pos.docxbin0 -> 9281 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-no-footer-overlap.docbin0 -> 48640 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-nomargins.docxbin0 -> 12737 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-not-wrapped-by-table.docxbin0 -> 12994 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-object-formatter.docxbin0 -> 21480 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-rowsplit.docxbin0 -> 13220 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-tab-join-legacy.docxbin0 -> 21410 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-tab-join.docxbin0 -> 21571 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-table-join.docxbin0 -> 16869 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-table-row-keep.docxbin0 -> 41801 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-then-table.docbin0 -> 50688 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-then-table.docxbin0 -> 28857 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-vertoffset.docxbin0 -> 12960 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-widow.docxbin0 -> 31279 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-wrap-on-all-pages.docxbin0 -> 13099 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-wrapped-by-table-nested.docxbin0 -> 28111 bytes
-rw-r--r--sw/qa/core/layout/data/floattable-wrapped-by-table.docxbin0 -> 12728 bytes
-rw-r--r--sw/qa/core/layout/data/floattable.docxbin0 -> 12966 bytes
-rw-r--r--sw/qa/core/layout/data/header-textbox.docxbin0 -> 5778 bytes
-rw-r--r--sw/qa/core/layout/data/inner-border.docxbin0 -> 12391 bytes
-rw-r--r--sw/qa/core/layout/data/linked-bullet.odtbin0 -> 8779 bytes
-rw-r--r--sw/qa/core/layout/data/page-remove-fly-no-table.fodt460
-rw-r--r--sw/qa/core/layout/data/page-remove-fly-table.odtbin0 -> 13943 bytes
-rw-r--r--sw/qa/core/layout/data/para-border-in-cell-clip.docxbin0 -> 12524 bytes
-rw-r--r--sw/qa/core/layout/data/rtl-table.docxbin0 -> 5487 bytes
-rw-r--r--sw/qa/core/layout/data/sorted-objs-insert.docxbin0 -> 27084 bytes
-rw-r--r--sw/qa/core/layout/data/split-table-border.odtbin0 -> 13057 bytes
-rw-r--r--sw/qa/core/layout/data/split-table-merged-border.odtbin0 -> 12318 bytes
-rw-r--r--sw/qa/core/layout/data/table-fly-overlap-spacing.docxbin27719 -> 24594 bytes
-rw-r--r--sw/qa/core/layout/data/table-in-footnote.docxbin0 -> 15684 bytes
-rw-r--r--sw/qa/core/layout/data/table-missing-join.docxbin0 -> 18441 bytes
-rw-r--r--sw/qa/core/layout/data/table-print-area-left.docxbin0 -> 11807 bytes
-rw-r--r--sw/qa/core/layout/data/tdf122894-4.docbin0 -> 214528 bytes
-rw-r--r--sw/qa/core/layout/data/tdf157096.docxbin0 -> 18904 bytes
-rw-r--r--sw/qa/core/layout/data/tdf45908_invoice.odtbin0 -> 4780 bytes
-rw-r--r--sw/qa/core/layout/data/vmerge-cell-border.docxbin0 -> 13610 bytes
-rw-r--r--sw/qa/core/layout/fly.cxx91
-rw-r--r--sw/qa/core/layout/flycnt.cxx1274
-rw-r--r--sw/qa/core/layout/frmtool.cxx40
-rw-r--r--sw/qa/core/layout/ftnfrm.cxx66
-rw-r--r--sw/qa/core/layout/layact.cxx135
-rw-r--r--sw/qa/core/layout/layout.cxx871
-rw-r--r--sw/qa/core/layout/paintfrm.cxx163
-rw-r--r--sw/qa/core/layout/sortedobjs.cxx35
-rw-r--r--sw/qa/core/layout/tabfrm.cxx261
-rw-r--r--sw/qa/core/layout/trvlfrm.cxx56
-rw-r--r--sw/qa/core/macros-test.cxx284
-rw-r--r--sw/qa/core/objectpositioning/data/floattable-follow-on-wrong-page.odtbin0 -> 38658 bytes
-rw-r--r--sw/qa/core/objectpositioning/data/floattable-overlap-cell.docxbin0 -> 26200 bytes
-rw-r--r--sw/qa/core/objectpositioning/data/floattable-tbl-overlap.docxbin0 -> 12734 bytes
-rw-r--r--sw/qa/core/objectpositioning/data/floattable-vert-orient-top.odtbin0 -> 14133 bytes
-rw-r--r--sw/qa/core/objectpositioning/data/inside-outside-vert-align.docxbin15838 -> 17252 bytes
-rw-r--r--sw/qa/core/objectpositioning/data/tdf154863-img-move-crash.docxbin0 -> 391748 bytes
-rw-r--r--sw/qa/core/objectpositioning/objectpositioning.cxx289
-rw-r--r--sw/qa/core/test_ToxLinkProcessor.cxx42
-rw-r--r--sw/qa/core/test_ToxMiscTest.cxx4
-rw-r--r--sw/qa/core/test_ToxWhitespaceStripper.cxx24
-rw-r--r--sw/qa/core/test_rect.cxx107
-rw-r--r--sw/qa/core/test_region.cxx108
-rw-r--r--sw/qa/core/text/data/A011-charheight.rtf27
-rw-r--r--sw/qa/core/text/data/Broken indent demo.odtbin0 -> 9970 bytes
-rw-r--r--sw/qa/core/text/data/clearing-break-header.fodt31
-rw-r--r--sw/qa/core/text/data/clearing-break-start.fodt28
-rw-r--r--sw/qa/core/text/data/clearing-break.fodt28
-rw-r--r--sw/qa/core/text/data/content-control-header.docxbin0 -> 36986 bytes
-rw-r--r--sw/qa/core/text/data/empty-numbering-page-split.fodt62
-rw-r--r--sw/qa/core/text/data/empty-superscript.docxbin0 -> 12239 bytes
-rw-r--r--sw/qa/core/text/data/firstLineIndent-withFlag.fodt31
-rw-r--r--sw/qa/core/text/data/floattable-anchor-height.docxbin0 -> 19441 bytes
-rw-r--r--sw/qa/core/text/data/floattable-anchor-left-margin.docxbin0 -> 16806 bytes
-rw-r--r--sw/qa/core/text/data/floattable-anchor-next-page.docxbin0 -> 9409 bytes
-rw-r--r--sw/qa/core/text/data/floattable-avoid-last-manip-ofst.docxbin0 -> 36224 bytes
-rw-r--r--sw/qa/core/text/data/floattable-avoid-manip-ofst.docxbin0 -> 21749 bytes
-rw-r--r--sw/qa/core/text/data/floattable-bad-fly-pos.docxbin0 -> 18586 bytes
-rw-r--r--sw/qa/core/text/data/floattable-leftover-para-portion.docxbin0 -> 15305 bytes
-rw-r--r--sw/qa/core/text/data/floattable-negative-vert-offset-empty.docxbin0 -> 9379 bytes
-rw-r--r--sw/qa/core/text/data/floattable-negative-vert-offset.docxbin0 -> 9243 bytes
-rw-r--r--sw/qa/core/text/data/floattable-overlap.docxbin0 -> 11939 bytes
-rw-r--r--sw/qa/core/text/data/floattable-wrap-empty-para-legacy.docxbin0 -> 15211 bytes
-rw-r--r--sw/qa/core/text/data/floattable-wrap-empty-para.docxbin0 -> 16195 bytes
-rw-r--r--sw/qa/core/text/data/fly-minimal-wrap.docxbin0 -> 24388 bytes
-rw-r--r--sw/qa/core/text/data/hide-whitespace-widorp.odtbin0 -> 16045 bytes
-rw-r--r--sw/qa/core/text/data/image.pngbin0 -> 3148 bytes
-rw-r--r--sw/qa/core/text/data/line-height.fodt32
-rw-r--r--sw/qa/core/text/data/line-width.fodt32
-rw-r--r--sw/qa/core/text/data/number-portion-format.odtbin0 -> 8984 bytes
-rw-r--r--sw/qa/core/text/data/number-portion-noformat.docxbin0 -> 13230 bytes
-rw-r--r--sw/qa/core/text/data/para-upper-margin-fly-intersect.docxbin0 -> 14872 bytes
-rw-r--r--sw/qa/core/text/data/placeholder.fodt9
-rw-r--r--sw/qa/core/text/data/ruby.fodt25
-rw-r--r--sw/qa/core/text/data/scriptinfo-surrogate-pairs.fodt293
-rw-r--r--sw/qa/core/text/data/tabovermargin-section.fodt50
-rw-r--r--sw/qa/core/text/data/tdf112594.fodt301
-rw-r--r--sw/qa/core/text/data/tdf129810.odtbin0 -> 24475 bytes
-rw-r--r--sw/qa/core/text/data/tdf139863.fodt302
-rw-r--r--sw/qa/core/text/data/tdf153040.docxbin0 -> 16322 bytes
-rw-r--r--sw/qa/core/text/data/tdf156146.fodt281
-rw-r--r--sw/qa/core/text/data/tdf158505.odtbin0 -> 21879 bytes
-rw-r--r--sw/qa/core/text/data/tdf159336.odtbin0 -> 9417 bytes
-rw-r--r--sw/qa/core/text/data/tdf41652_legacy.fodt300
-rw-r--r--sw/qa/core/text/data/tdf41652_variableNBSPdisabled.fodt301
-rw-r--r--sw/qa/core/text/data/tdf41652_variableNBSPenabled.fodt301
-rw-r--r--sw/qa/core/text/data/tdf43100_tdf120715_cursorOnSpacesOverMargin.docxbin0 -> 9606 bytes
-rw-r--r--sw/qa/core/text/data/tdf89288.fodt307
-rw-r--r--sw/qa/core/text/frmform.cxx154
-rw-r--r--sw/qa/core/text/itratr.cxx58
-rw-r--r--sw/qa/core/text/itrform2.cxx229
-rw-r--r--sw/qa/core/text/porlay.cxx60
-rw-r--r--sw/qa/core/text/porrst.cxx94
-rw-r--r--sw/qa/core/text/text.cxx1601
-rw-r--r--sw/qa/core/text/widorp.cxx65
-rw-r--r--sw/qa/core/theme/ThemeTest.cxx486
-rw-r--r--sw/qa/core/theme/data/ThemeColorInHeading.docxbin0 -> 12352 bytes
-rw-r--r--sw/qa/core/theme/data/ThemeColorInHeading.fodt391
-rw-r--r--sw/qa/core/tox/tox.cxx258
-rw-r--r--sw/qa/core/txtnode/data/floattable-anchor-split.docxbin0 -> 13035 bytes
-rw-r--r--sw/qa/core/txtnode/data/fly-anchor-undo.odtbin0 -> 10299 bytes
-rw-r--r--sw/qa/core/txtnode/data/special-insert-after-merged-cells.fodt25
-rw-r--r--sw/qa/core/txtnode/data/tdf157287.odtbin0 -> 11460 bytes
-rw-r--r--sw/qa/core/txtnode/data/title-field-invalidate.fodt25
-rw-r--r--sw/qa/core/txtnode/justify.cxx185
-rw-r--r--sw/qa/core/txtnode/txtnode.cxx475
-rw-r--r--sw/qa/core/undo/data/anchor-type-change-position.docxbin0 -> 49986 bytes
-rw-r--r--sw/qa/core/undo/data/image-as-character.odtbin0 -> 9907 bytes
-rw-r--r--sw/qa/core/undo/data/table-copy-redline.odtbin0 -> 32554 bytes
-rw-r--r--sw/qa/core/undo/undo.cxx116
-rw-r--r--sw/qa/core/unocore/data/broken-embedded-object.odtbin0 -> 14360 bytes
-rw-r--r--sw/qa/core/unocore/data/floattable-outer-nonsplit-inner.docxbin0 -> 16566 bytes
-rw-r--r--sw/qa/core/unocore/data/floattable-split.docxbin0 -> 18840 bytes
-rw-r--r--sw/qa/core/unocore/data/graphic.pngbin0 -> 766 bytes
-rw-r--r--sw/qa/core/unocore/data/paragraph-marker-formatted-run.docxbin0 -> 13294 bytes
-rw-r--r--sw/qa/core/unocore/data/paragraph-marker.docxbin0 -> 13282 bytes
-rw-r--r--sw/qa/core/unocore/data/tdf108272-1-minimal.docxbin0 -> 20886 bytes
-rw-r--r--sw/qa/core/unocore/data/tdf149555.docxbin0 -> 20132 bytes
-rw-r--r--sw/qa/core/unocore/unocore.cxx1029
-rw-r--r--sw/qa/core/uwriter.cxx635
-rw-r--r--sw/qa/core/view/data/update-ole-object-previews.odtbin0 -> 10726 bytes
-rw-r--r--sw/qa/core/view/view.cxx72
297 files changed, 16468 insertions, 1020 deletions
diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx
index ea70a74aaccb..6754cda04007 100644
--- a/sw/qa/core/Test-BigPtrArray.cxx
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -25,42 +25,40 @@
#include <bparr.hxx>
-using namespace std;
-
namespace /* private */
{
- const sal_uLong NUM_ENTRIES = 10;
+ const sal_Int32 NUM_ENTRIES = 10;
class BigPtrEntryMock : public BigPtrEntry
{
public:
- explicit BigPtrEntryMock(sal_uLong count) : count_(count)
+ explicit BigPtrEntryMock(sal_Int32 count) : count_(count)
{
}
- sal_uLong getCount() const
+ sal_Int32 getCount() const
{
return count_;
}
- sal_uLong Position() const
+ sal_Int32 Position() const
{
return GetPos();
}
private:
- sal_uLong count_;
+ sal_Int32 count_;
};
- void fillBigPtrArray(BigPtrArray& bparr, sal_uLong numEntries)
+ void fillBigPtrArray(BigPtrArray& bparr, sal_Int32 numEntries)
{
- for (sal_uLong i = 0; i < numEntries; i++)
+ for (sal_Int32 i = 0; i < numEntries; i++)
bparr.Insert(new BigPtrEntryMock(i), bparr.Count());
}
bool checkElementPositions(const BigPtrArray& bparr)
{
- for (sal_uLong i = 0; i < bparr.Count(); i++)
+ for (sal_Int32 i = 0; i < bparr.Count(); i++)
{
if (static_cast<BigPtrEntryMock*>(bparr[i])->Position() != i)
return false;
@@ -70,7 +68,7 @@ namespace /* private */
void releaseBigPtrArrayContent(BigPtrArray const & bparr)
{
- for (sal_uLong i = 0; i < bparr.Count(); i++)
+ for (sal_Int32 i = 0; i < bparr.Count(); i++)
delete bparr[i];
}
}
@@ -95,7 +93,7 @@ public:
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"BigPtrArray ctor failed",
- static_cast<sal_uLong>(0), bparr.Count()
+ static_cast<sal_Int32>(0), bparr.Count()
);
}
@@ -103,9 +101,9 @@ public:
{
BigPtrArray bparr;
- for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
+ for (sal_Int32 i = 0; i < NUM_ENTRIES; i++)
{
- sal_uLong oldCount = bparr.Count();
+ sal_Int32 oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(i), 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
@@ -114,7 +112,7 @@ public:
);
}
- for (sal_uLong i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
+ for (sal_Int32 i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
{
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
@@ -138,14 +136,19 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
- sal_uLong oldCount = bparr.Count();
+ sal_Int32 oldCount = bparr.Count();
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
@@ -163,10 +166,10 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
- const sal_uLong oldCount = bparr.Count();
+ const sal_Int32 oldCount = bparr.Count();
// insert 5 elements
- for (sal_uLong i = 0, j = 30; i < 5; i++, j++)
+ for (sal_Int32 i = 0, j = 30; i < 5; i++, j++)
bparr.Insert(new BigPtrEntryMock(j), i);
CPPUNIT_ASSERT_EQUAL_MESSAGE
@@ -177,7 +180,7 @@ public:
// now, first 5 elements have counts: 30,31,..34
// next 10 elements have counts: 0,1,..9
- for (sal_uLong i = 0, j = 30; i < bparr.Count(); i++, j++)
+ for (sal_Int32 i = 0, j = 30; i < bparr.Count(); i++, j++)
{
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
@@ -201,13 +204,18 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
- sal_uLong oldCount = bparr.Count();
+ sal_Int32 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
@@ -225,9 +233,9 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
- for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
+ for (sal_Int32 i = 0; i < NUM_ENTRIES; i++)
{
- sal_uLong oldCount = bparr.Count();
+ sal_Int32 oldCount = bparr.Count();
delete bparr[0]; // release content
bparr.Remove(0); // remove item from container
@@ -238,7 +246,7 @@ public:
oldCount - 1, bparr.Count()
);
- for (sal_uLong j = 0, k = i + 1; j < bparr.Count(); j++, k++)
+ for (sal_Int32 j = 0, k = i + 1; j < bparr.Count(); j++, k++)
{
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
@@ -263,7 +271,7 @@ public:
for (int i = NUM_ENTRIES - 1; i >= 0; i--)
{
- sal_uLong oldCount = bparr.Count();
+ sal_Int32 oldCount = bparr.Count();
delete bparr[i];
bparr.Remove(i);
@@ -273,7 +281,7 @@ public:
(oldCount - 1), bparr.Count()
);
- for (sal_uLong j = 0; j < bparr.Count(); j++)
+ for (sal_Int32 j = 0; j < bparr.Count(); j++)
{
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
@@ -298,8 +306,8 @@ public:
while (bparr.Count())
{
- sal_uLong oldCount = bparr.Count();
- sal_uLong oldElement = static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount();
+ sal_Int32 oldCount = bparr.Count();
+ sal_Int32 oldElement = static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount();
delete bparr[bparr.Count() / 2];
bparr.Remove(bparr.Count() / 2);
@@ -310,7 +318,7 @@ public:
oldCount - 1, bparr.Count()
);
- for (sal_uLong i = 0; i < bparr.Count(); i++)
+ for (sal_Int32 i = 0; i < bparr.Count(); i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -335,10 +343,10 @@ public:
while(bparr.Count())
{
- sal_uLong nRemove = std::min<sal_uLong>(bparr.Count(), 3);
- sal_uLong oldCount = bparr.Count();
+ sal_Int32 nRemove = std::min<sal_Int32>(bparr.Count(), 3);
+ sal_Int32 oldCount = bparr.Count();
- for (sal_uLong i = 0; i < nRemove; i++)
+ for (sal_Int32 i = 0; i < nRemove; i++)
delete bparr[i];
bparr.Remove(0, nRemove);
@@ -369,7 +377,7 @@ public:
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"test_remove_all_elements_at_once failed",
- static_cast<sal_uLong>(0), bparr.Count()
+ static_cast<sal_Int32>(0), bparr.Count()
);
}
@@ -379,12 +387,12 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
- for (sal_uLong i = 0; i < NUM_ENTRIES - 1; i++)
+ for (sal_Int32 i = 0; i < NUM_ENTRIES - 1; i++)
{
bparr.Move(i, i + 2);
}
- for (sal_uLong i = 0; i < (NUM_ENTRIES - 1); i++)
+ for (sal_Int32 i = 0; i < (NUM_ENTRIES - 1); i++)
{
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
@@ -396,7 +404,7 @@ public:
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"test_move_elements_from_lower_to_higher_pos failed",
- static_cast<sal_uLong>(0), static_cast<BigPtrEntryMock*>(bparr[NUM_ENTRIES -1])->getCount()
+ static_cast<sal_Int32>(0), static_cast<BigPtrEntryMock*>(bparr[NUM_ENTRIES -1])->getCount()
);
CPPUNIT_ASSERT_MESSAGE
@@ -425,7 +433,7 @@ public:
(NUM_ENTRIES - 1), static_cast<BigPtrEntryMock*>(bparr[0])->getCount()
);
- for (sal_uLong i = 1; i < NUM_ENTRIES; i++)
+ for (sal_Int32 i = 1; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
@@ -449,12 +457,12 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
- for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
+ for (sal_Int32 i = 0; i < NUM_ENTRIES; i++)
{
bparr.Move(i, i);
}
- for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
+ for (sal_Int32 i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
@@ -478,13 +486,13 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
- for (sal_uLong i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
+ for (sal_Int32 i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
{
delete bparr[i];
bparr.Replace(i, new BigPtrEntryMock(j));
}
- for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
+ for (sal_Int32 i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index bc3446f30514..bfe2e08d8543 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -9,24 +9,28 @@
#include <swmodeltestbase.hxx>
#include <AccessibilityCheck.hxx>
-#include <unotxdoc.hxx>
-#include <docsh.hxx>
+#include <AccessibilityIssue.hxx>
+#include <OnlineAccessibilityCheck.hxx>
+#include <wrtsh.hxx>
+#include <vcl/scheduler.hxx>
+#include <comphelper/propertysequence.hxx>
+
+#include <comphelper/scopeguard.hxx>
+#include <officecfg/Office/Common.hxx>
class AccessibilityCheckTest : public SwModelTestBase
{
public:
- SwDoc* createDoc(const char* pName = nullptr)
+ AccessibilityCheckTest()
+ : SwModelTestBase("/sw/qa/core/accessibilitycheck/data/")
{
- load(u"/sw/qa/core/accessibilitycheck/data/", pName);
- SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
- CPPUNIT_ASSERT(pTextDoc);
- return pTextDoc->GetDocShell()->GetDoc();
}
};
CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckDocumentIssues)
{
- SwDoc* pDoc = createDoc("DocumentTest.odt");
+ createSwDoc("DocumentTest.odt");
+ SwDoc* pDoc = getSwDoc();
CPPUNIT_ASSERT(pDoc);
sw::AccessibilityCheck aCheck(pDoc);
aCheck.check();
@@ -38,20 +42,358 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckDocumentIssues)
CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testTableSplitMergeAndAltText)
{
- SwDoc* pDoc = createDoc("AccessibilityTests1.odt");
+ createSwDoc("AccessibilityTests1.odt");
+ SwDoc* pDoc = getSwDoc();
CPPUNIT_ASSERT(pDoc);
sw::AccessibilityCheck aCheck(pDoc);
aCheck.check();
auto& aIssues = aCheck.getIssueCollection().getIssues();
- CPPUNIT_ASSERT_EQUAL(size_t(7), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(6), aIssues.size());
CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::NO_ALT_GRAPHIC, aIssues[0]->m_eIssueID);
- CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::NO_ALT_OLE, aIssues[1]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_MERGE_SPLIT, aIssues[1]->m_eIssueID);
CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_MERGE_SPLIT, aIssues[2]->m_eIssueID);
CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_MERGE_SPLIT, aIssues[3]->m_eIssueID);
CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_MERGE_SPLIT, aIssues[4]->m_eIssueID);
- CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_MERGE_SPLIT, aIssues[5]->m_eIssueID);
- CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::NO_ALT_SHAPE, aIssues[6]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::NO_ALT_SHAPE, aIssues[5]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckParagraphIssues)
+{
+ // Tests whether formatting issues are detected when the whole paragraph has them instead of
+ // some text inside the paragraph
+ createSwDoc("ParagraphTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckBackgroundImage)
+{
+ createSwDoc("BackgroundImageTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DOCUMENT_BACKGROUND, aIssues[0]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckLinkedImage)
+{
+ createSwDoc("LinkedImageTest.fodt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(4), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::LINKED_GRAPHIC, aIssues[1]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckNewlineSpace)
+{
+ createSwDoc("NewlineTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckSpacebarSpace)
+{
+ createSwDoc("SpaceTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testHyperlinks)
+{
+ createSwDoc("HyperlinkTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_SHORT, aIssues[0]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_IS_TEXT, aIssues[1]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckHighlightedText)
+{
+ createSwDoc("HighlightTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testNumberingCheck)
+{
+ createSwDoc("AccessibilityTests_NumberingCheck.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(5), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::MANUAL_NUMBERING, aIssues[0]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::MANUAL_NUMBERING, aIssues[1]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::MANUAL_NUMBERING, aIssues[2]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::MANUAL_NUMBERING, aIssues[3]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::MANUAL_NUMBERING, aIssues[4]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckFakeFootnote)
+{
+ createSwDoc("FakeFootnoteTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::FAKE_FOOTNOTE, aIssues[0]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::FAKE_FOOTNOTE, aIssues[1]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckFakeCaption)
+{
+ createSwDoc("FakeCaptionTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::FAKE_CAPTION, aIssues[0]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckTableFormatting)
+{
+ createSwDoc("TableFormattingTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_FORMATTING, aIssues[0]->m_eIssueID);
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckTabsFormatting)
+{
+ createSwDoc("TabsTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(4), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[2]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[3]->m_eIssueID);
+}
+
+//tdf#156550 - Accessibility sidebar complains about TOC hyperlinks
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckTOCHyperlink)
+{
+ createSwDoc("TOCHyperlinkTest.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ // Without the fix in place, this test would have failed with
+ // - Expected: 0 (No Detected HYPERLINK_IS_TEXT Issues)
+ // - Actual : 4 (Number of TOC Hyperlinks)
+ CPPUNIT_ASSERT_EQUAL(size_t(0), aIssues.size());
+}
+
+namespace
+{
+std::vector<std::shared_ptr<sfx::AccessibilityIssue>>
+scanAccessibilityIssuesOnNodes(SwDoc* pDocument)
+{
+ std::vector<std::shared_ptr<sfx::AccessibilityIssue>> aIssues;
+ auto const& pNodes = pDocument->GetNodes();
+ for (SwNodeOffset n(0); n < pNodes.Count(); ++n)
+ {
+ SwNode* pNode = pNodes[n];
+ auto& pCollection = pNode->getAccessibilityCheckStatus().pCollection;
+ if (pCollection)
+ {
+ for (auto& pIssue : pCollection->getIssues())
+ {
+ aIssues.push_back(pIssue);
+ }
+ }
+ }
+ return aIssues;
+}
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckTabsinTOC)
+{
+ createSwDoc("Tabs-in-TOC.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ sw::AccessibilityCheck aCheck(pDoc);
+ aCheck.check();
+ auto& aIssues = aCheck.getIssueCollection().getIssues();
+ CPPUNIT_ASSERT_EQUAL(size_t(0), aIssues.size());
+}
+
+void checkIssuePosition(std::shared_ptr<sfx::AccessibilityIssue> const& pIssue, int nLine,
+ sal_Int32 nStart, sal_Int32 nEnd, SwNodeOffset nIndex)
+{
+ auto* pSwIssue = static_cast<sw::AccessibilityIssue*>(pIssue.get());
+
+ OString sFailMessage = OString::Concat("Start doesn't match at line: ")
+ + OString::Concat(OString::number(nLine));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailMessage.getStr(), nStart, pSwIssue->getStart());
+
+ sFailMessage
+ = OString::Concat("End doesn't match at line: ") + OString::Concat(OString::number(nLine));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailMessage.getStr(), nEnd, pSwIssue->getEnd());
+
+ sFailMessage = OString::Concat("Offset doesn't match at line: ")
+ + OString::Concat(OString::number(nLine));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailMessage.getStr(), nIndex, pSwIssue->getNode()->GetIndex());
+}
+
+} // end anonymous ns
+
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testOnlineNodeSplitAppend)
+{
+ // Checks the a11y checker is setting the a11y issues to the nodes
+ // correctly when splitting and appending nodes (through undo), which
+ // happen on editing all the time.
+ // When a node is split, it can happen that both nodes get a11y issues
+ // if the node splits the area of direct formatting.
+
+ createSwDoc("OnlineCheck.odt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // Enable online a11y checker
+ {
+ auto pBatch(comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Accessibility::OnlineAccessibilityCheck::set(true, pBatch);
+ pBatch->commit();
+ }
+ comphelper::ScopeGuard g([] {
+ auto pBatch(comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Accessibility::OnlineAccessibilityCheck::set(false, pBatch);
+ pBatch->commit();
+ });
+
+ Scheduler::ProcessEventsToIdle();
+
+ // Check we have 2 a11y issue
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2),
+ pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues());
+ auto aIssues = scanAccessibilityIssuesOnNodes(pDoc);
+ CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID);
+ checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9));
+ checkIssuePosition(aIssues[1], __LINE__, 33, 136, SwNodeOffset(9));
+
+ // Position the cursor and hit "enter" (trigger split-node action)
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 33, /*bBasicCall=*/false);
+ pWrtShell->SplitNode();
+
+ // Check the result
+ CPPUNIT_ASSERT_EQUAL(OUString("He heard quiet steps behind him. "),
+ getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("That didn't bode well. Who could be following him this late at "
+ "night and in this deadbeat part of town?"),
+ getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2),
+ pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues());
+
+ aIssues = scanAccessibilityIssuesOnNodes(pDoc);
+ CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID);
+ checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9));
+ checkIssuePosition(aIssues[1], __LINE__, 0, 103, SwNodeOffset(10));
+
+ // Position cursor and split again
+ pWrtShell->Down(/*bSelect*/ false, /*nCount*/ 0);
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 23, /*bBasicCall=*/false);
+ pWrtShell->SplitNode();
+
+ // Check the result
+ CPPUNIT_ASSERT_EQUAL(OUString("He heard quiet steps behind him. "),
+ getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("That didn't bode well. "), getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString(
+ "Who could be following him this late at night and in this deadbeat part of town?"),
+ getParagraph(3)->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3),
+ pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues());
+ aIssues = scanAccessibilityIssuesOnNodes(pDoc);
+ CPPUNIT_ASSERT_EQUAL(size_t(3), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[2]->m_eIssueID);
+ checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9));
+ checkIssuePosition(aIssues[1], __LINE__, 0, 23, SwNodeOffset(10));
+ checkIssuePosition(aIssues[2], __LINE__, 0, 80, SwNodeOffset(11));
+
+ // Undo second change
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(OUString("He heard quiet steps behind him. "),
+ getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("That didn't bode well. Who could be following him this late at "
+ "night and in this deadbeat part of town?"),
+ getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2),
+ pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues());
+ aIssues = scanAccessibilityIssuesOnNodes(pDoc);
+ CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID);
+ checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9));
+ checkIssuePosition(aIssues[1], __LINE__, 0, 103, SwNodeOffset(10));
+
+ // Undo first change
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2),
+ pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("He heard quiet steps behind him. That didn't bode well. Who could be following "
+ "him this late at night and in this deadbeat part of town?"),
+ getParagraph(1)->getString());
+ aIssues = scanAccessibilityIssuesOnNodes(pDoc);
+ CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size());
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID);
+ CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID);
+ checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9));
+ checkIssuePosition(aIssues[1], __LINE__, 33, 136, SwNodeOffset(9));
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/core/accessibilitycheck/data/AccessibilityTests1.odt b/sw/qa/core/accessibilitycheck/data/AccessibilityTests1.odt
index 2e319f58e7a2..405fd6647a08 100644
--- a/sw/qa/core/accessibilitycheck/data/AccessibilityTests1.odt
+++ b/sw/qa/core/accessibilitycheck/data/AccessibilityTests1.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/AccessibilityTests_NumberingCheck.odt b/sw/qa/core/accessibilitycheck/data/AccessibilityTests_NumberingCheck.odt
new file mode 100644
index 000000000000..190ee91a8fde
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/AccessibilityTests_NumberingCheck.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/BackgroundImageTest.odt b/sw/qa/core/accessibilitycheck/data/BackgroundImageTest.odt
new file mode 100644
index 000000000000..eff6f178394b
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/BackgroundImageTest.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/FakeCaptionTest.odt b/sw/qa/core/accessibilitycheck/data/FakeCaptionTest.odt
new file mode 100644
index 000000000000..9630bfcf73d7
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/FakeCaptionTest.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/FakeFootnoteTest.odt b/sw/qa/core/accessibilitycheck/data/FakeFootnoteTest.odt
new file mode 100644
index 000000000000..fdacf6cb35de
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/FakeFootnoteTest.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/HighlightTest.odt b/sw/qa/core/accessibilitycheck/data/HighlightTest.odt
new file mode 100644
index 000000000000..a8f13e142ce1
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/HighlightTest.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt b/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt
new file mode 100644
index 000000000000..1eba1932ce21
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/LinkedImageTest.fodt b/sw/qa/core/accessibilitycheck/data/LinkedImageTest.fodt
new file mode 100644
index 000000000000..c73162b18372
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/LinkedImageTest.fodt
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:h text:style-name="P3" text:outline-level="1">Linked graphic</text:h>
+ <text:p text:style-name="P1"><draw:frame draw:style-name="fr1" draw:name="Image2" text:anchor-type="as-char" svg:width="92.3pt" svg:height="92.3pt" draw:z-index="0"><draw:image xlink:href="x2.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
+ </draw:frame></text:p>
+ <text:h text:style-name="P3" text:outline-level="1">Embedded graphic</text:h>
+ <text:p text:style-name="P2"><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char" svg:width="89.89pt" svg:height="89.89pt" draw:z-index="0"><draw:image draw:mime-type="image/gif">
+ <office:binary-data>R0lGODlhAgACAPABAAAAAP///yH5BAAAAAAAIf4tIFRoaXMgaXMgYW4gZXhhbXBsZSBiaXRt
+ YXAgb2YgdGhlIGxldHRlciAiSiIKACH/C0ltYWdlTWFnaWNrDmdhbW1hPTAuNDU0NTQ1ACwA
+ AAAAAgACAAACA0QCBQA7
+ </office:binary-data>
+ </draw:image>
+ </draw:frame></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/accessibilitycheck/data/NewlineTest.odt b/sw/qa/core/accessibilitycheck/data/NewlineTest.odt
new file mode 100644
index 000000000000..9ff715916fc2
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/NewlineTest.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/OnlineCheck.odt b/sw/qa/core/accessibilitycheck/data/OnlineCheck.odt
new file mode 100644
index 000000000000..d24fb4ff1abf
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/OnlineCheck.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/ParagraphTest.odt b/sw/qa/core/accessibilitycheck/data/ParagraphTest.odt
new file mode 100644
index 000000000000..766ecd0b4e2e
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/ParagraphTest.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/SpaceTest.odt b/sw/qa/core/accessibilitycheck/data/SpaceTest.odt
new file mode 100644
index 000000000000..0f00f78f9698
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/SpaceTest.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/TOCHyperlinkTest.odt b/sw/qa/core/accessibilitycheck/data/TOCHyperlinkTest.odt
new file mode 100644
index 000000000000..506fc935ac1e
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/TOCHyperlinkTest.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/TableFormattingTest.odt b/sw/qa/core/accessibilitycheck/data/TableFormattingTest.odt
new file mode 100644
index 000000000000..adc63daaf7cb
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/TableFormattingTest.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/Tabs-in-TOC.odt b/sw/qa/core/accessibilitycheck/data/Tabs-in-TOC.odt
new file mode 100644
index 000000000000..2b3ce54cc5a3
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/Tabs-in-TOC.odt
Binary files differ
diff --git a/sw/qa/core/accessibilitycheck/data/TabsTest.odt b/sw/qa/core/accessibilitycheck/data/TabsTest.odt
new file mode 100644
index 000000000000..29b415df87a7
--- /dev/null
+++ b/sw/qa/core/accessibilitycheck/data/TabsTest.odt
Binary files differ
diff --git a/sw/qa/core/attr/attr.cxx b/sw/qa/core/attr/attr.cxx
new file mode 100644
index 000000000000..a83a3228dd1d
--- /dev/null
+++ b/sw/qa/core/attr/attr.cxx
@@ -0,0 +1,101 @@
+/* -*- 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 <docsh.hxx>
+#include <swdtflvr.hxx>
+#include <swmodule.hxx>
+#include <frmmgr.hxx>
+#include <frameformats.hxx>
+#include <formatflysplit.hxx>
+#include <formatwraptextatflystart.hxx>
+
+namespace
+{
+/// Covers sw/source/core/attr/ fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/attr/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testSwAttrSet)
+{
+ // Given a document with track changes and the whole document is selected:
+ createSwDoc("attr-set.docx");
+ SwDoc* pDoc = getSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ rtl::Reference<SwTransferable> xTransferable(new SwTransferable(*pWrtShell));
+ SwModule* pMod = SW_MOD();
+ SwTransferable* pOldTransferable = pMod->m_pXSelection;
+ pMod->m_pXSelection = xTransferable.get();
+
+ // When getting the plain text version of the selection:
+ datatransfer::DataFlavor aFlavor;
+ aFlavor.MimeType = "text/plain;charset=utf-16";
+ aFlavor.DataType = cppu::UnoType<OUString>::get();
+ uno::Any aData = xTransferable->getTransferData(aFlavor);
+
+ // Then make sure we get data without crashing:
+ CPPUNIT_ASSERT(aData.hasValue());
+ pMod->m_pXSelection = pOldTransferable;
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFormatFlySplit)
+{
+ createSwDoc();
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ RndStdIds eAnchor = RndStdIds::FLY_AT_PARA;
+ aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize());
+ SwDoc* pDoc = getSwDoc();
+ sw::SpzFrameFormats& rFlys = *pDoc->GetSpzFrameFormats();
+ sw::SpzFrameFormat* pFly = rFlys[0];
+ CPPUNIT_ASSERT(!pFly->GetAttrSet().GetFlySplit().GetValue());
+
+ SfxItemSet aSet(pFly->GetAttrSet());
+ SwFormatFlySplit aItem(true);
+ aSet.Put(aItem);
+ pDoc->SetFlyFrameAttr(*pFly, aSet);
+
+ CPPUNIT_ASSERT(pFly->GetAttrSet().GetFlySplit().GetValue());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFormatWrapTextAtFlyStart)
+{
+ createSwDoc();
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ RndStdIds eAnchor = RndStdIds::FLY_AT_PARA;
+ aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize());
+ SwDoc* pDoc = getSwDoc();
+ sw::SpzFrameFormats& rFlys = *pDoc->GetSpzFrameFormats();
+ sw::SpzFrameFormat* pFly = rFlys[0];
+ CPPUNIT_ASSERT(!pFly->GetAttrSet().GetWrapTextAtFlyStart().GetValue());
+
+ SfxItemSet aSet(pFly->GetAttrSet());
+ SwFormatWrapTextAtFlyStart aItem(true);
+ aSet.Put(aItem);
+ pDoc->SetFlyFrameAttr(*pFly, aSet);
+
+ CPPUNIT_ASSERT(pFly->GetAttrSet().GetWrapTextAtFlyStart().GetValue());
+}
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/attr/data/attr-set.docx b/sw/qa/core/attr/data/attr-set.docx
new file mode 100644
index 000000000000..0cb8508aa2a4
--- /dev/null
+++ b/sw/qa/core/attr/data/attr-set.docx
Binary files differ
diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx
index 0b93fcc43522..72d271638d09 100644
--- a/sw/qa/core/crsr/crsr.cxx
+++ b/sw/qa/core/crsr/crsr.cxx
@@ -23,17 +23,22 @@
#include <docsh.hxx>
#include <unotxdoc.hxx>
#include <wrtsh.hxx>
-
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/crsr/data/";
+#include <ndtxt.hxx>
+#include <formatcontentcontrol.hxx>
/// Covers sw/source/core/crsr/ fixes.
class SwCoreCrsrTest : public SwModelTestBase
{
+public:
+ SwCoreCrsrTest()
+ : SwModelTestBase("/sw/qa/core/crsr/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testFindReplace)
{
- loadURL("private:factory/swriter", nullptr);
+ createSwDoc();
// Given: a document with two "foo" in it, the second followed by a formatted soft hyphen.
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
@@ -43,7 +48,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testFindReplace)
xText->insertString(xText->getEnd(), "foo xxx", /*bAbsorb=*/false);
xText->insertControlCharacter(xText->getEnd(), text::ControlCharacter::PARAGRAPH_BREAK,
/*bAbsorb=*/false);
- xText->insertString(xText->getEnd(), OUString(u"foo xxx \xad after"), /*bAbsorb=*/false);
+ xText->insertString(xText->getEnd(), u"foo xxx \xad after"_ustr, /*bAbsorb=*/false);
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
xModel->getCurrentController(), uno::UNO_QUERY);
@@ -52,14 +57,14 @@ CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testFindReplace)
xViewCursor->goLeft(/*nCount=*/6, /*bExpand=*/false);
xViewCursor->goLeft(/*nCount=*/1, /*bExpand=*/true);
uno::Reference<beans::XPropertySet> xViewCursorProps(xViewCursor, uno::UNO_QUERY);
- xViewCursorProps->setPropertyValue("CharWeight", uno::makeAny(awt::FontWeight::BOLD));
+ xViewCursorProps->setPropertyValue("CharWeight", uno::Any(awt::FontWeight::BOLD));
xViewCursor->gotoStart(/*bExpand=*/false);
// When: doing search & replace 3 times.
uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence({
- { "SearchItem.SearchString", uno::makeAny(OUString("foo")) },
- { "SearchItem.ReplaceString", uno::makeAny(OUString("bar")) },
- { "SearchItem.Command", uno::makeAny(static_cast<sal_Int16>(SvxSearchCmd::REPLACE)) },
+ { "SearchItem.SearchString", uno::Any(OUString("foo")) },
+ { "SearchItem.ReplaceString", uno::Any(OUString("bar")) },
+ { "SearchItem.Command", uno::Any(static_cast<sal_Int16>(SvxSearchCmd::REPLACE)) },
}));
// Find the first foo.
dispatchCommand(mxComponent, ".uno:ExecuteSearch", aArgs);
@@ -84,7 +89,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testFindReplace)
CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testSelAllStartsWithTable)
{
- load(DATA_DIRECTORY, "sel-all-starts-with-table.odt");
+ createSwDoc("sel-all-starts-with-table.odt");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pDocShell = pTextDoc->GetDocShell();
SwDoc* pDoc = pDocShell->GetDoc();
@@ -104,6 +109,129 @@ CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testSelAllStartsWithTable)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pDoc->GetTableFrameFormatCount(/*bUsed=*/true));
}
+CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testContentControlLineBreak)
+{
+ // Given a document with a (rich text) content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // When pressing "enter" in the middle of that content control:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ // Go after "t".
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 2, /*bBasicCall=*/false);
+ dispatchCommand(mxComponent, ".uno:InsertPara", {});
+
+ // Then make sure that we only insert a line break, not a new paragraph:
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetMark()->GetNode().GetTextNode();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: t\nest
+ // - Actual : est
+ // i.e. a new paragraph was inserted, which is not allowed for inline content controls.
+ CPPUNIT_ASSERT_EQUAL(OUString("t\nest"), pTextNode->GetExpandText(pWrtShell->GetLayout()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testContentControlReadOnly)
+{
+ // Given a document with a checkbox content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, u"â˜"_ustr, /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ xContentControlProps->setPropertyValue("Checkbox", uno::Any(true));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // When entering the content control:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+
+ // Then make sure that the cursor is read-only:
+ // Without the accompanying fix in place, this test would have failed, it was possible to type
+ // into the checkbox content control, just to loose the typed content on the next click.
+ CPPUNIT_ASSERT(pWrtShell->HasReadonlySel());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testTdf135451)
+{
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // Insert narrow no-break space and move the cursor right before it
+ pWrtShell->Insert(u"a" + OUStringChar(CHAR_NNBSP) + "b");
+ pWrtShell->EndPara(/*bSelect=*/false);
+ pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->GoPrevWord();
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: a
+ // - Actual : CHAR_NNBSP
+ // i.e., the cursor did not move over the narrow no-break space (CHAR_NNBSP)
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), pWrtShell->GetSelText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testDropdownContentControl)
+{
+ // Given a document with a dropdown content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::DROP_DOWN_LIST);
+
+ // When entering the content control:
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+
+ // Then make sure that the cursor is read-only:
+ // Without the accompanying fix in place, this test would have failed, it was possible to type
+ // into the drop-down content control, providing content that is not one of the list items.
+ CPPUNIT_ASSERT(pWrtShell->HasReadonlySel());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testContentControlProtectedSection)
+{
+ // Given a document with a date content control in a protected section:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::DATE);
+ pWrtShell->SelAll();
+ OUString aSectionName = pWrtShell->GetUniqueSectionName();
+ SwSectionData aSection(SectionType::Content, aSectionName);
+ aSection.SetProtectFlag(true);
+ pWrtShell->InsertSection(aSection);
+
+ // When entering the content control:
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+
+ // Then make sure that the cursor is read-only:
+ // Without the accompanying fix in place, this test would have failed, it was not possible to
+ // pick a date in a protected section (the new value was inserted, but the placeholder was not
+ // removed).
+ CPPUNIT_ASSERT(!pWrtShell->HasReadonlySel());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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/data/doc/tdf124937.doc b/sw/qa/core/data/doc/tdf124937.doc
deleted file mode 100644
index 4a3f91f7c020..000000000000
--- a/sw/qa/core/data/doc/tdf124937.doc
+++ /dev/null
Binary files differ
diff --git a/sw/qa/core/data/doc/testVba.doc b/sw/qa/core/data/doc/testVba.doc
deleted file mode 100644
index e8c87c6eec5b..000000000000
--- a/sw/qa/core/data/doc/testVba.doc
+++ /dev/null
Binary files differ
diff --git a/sw/qa/core/data/docm/testDocumentRange.docm b/sw/qa/core/data/docm/testDocumentRange.docm
new file mode 100644
index 000000000000..f1d5b328c383
--- /dev/null
+++ b/sw/qa/core/data/docm/testDocumentRange.docm
Binary files differ
diff --git a/sw/qa/core/data/docm/testFind.docm b/sw/qa/core/data/docm/testFind.docm
new file mode 100644
index 000000000000..afcba6f0e5d0
--- /dev/null
+++ b/sw/qa/core/data/docm/testFind.docm
Binary files differ
diff --git a/sw/qa/core/data/docm/testFontColor.docm b/sw/qa/core/data/docm/testFontColor.docm
new file mode 100644
index 000000000000..8e43601cf6d3
--- /dev/null
+++ b/sw/qa/core/data/docm/testFontColor.docm
Binary files differ
diff --git a/sw/qa/core/data/docm/testModernVBA.docm b/sw/qa/core/data/docm/testModernVBA.docm
new file mode 100644
index 000000000000..c08d738c8adb
--- /dev/null
+++ b/sw/qa/core/data/docm/testModernVBA.docm
Binary files differ
diff --git a/sw/qa/core/data/docm/testModernVBADelete.docm b/sw/qa/core/data/docm/testModernVBADelete.docm
new file mode 100644
index 000000000000..e3a70719de3a
--- /dev/null
+++ b/sw/qa/core/data/docm/testModernVBADelete.docm
Binary files differ
diff --git a/sw/qa/core/data/docm/testParagraphFormat.docm b/sw/qa/core/data/docm/testParagraphFormat.docm
new file mode 100644
index 000000000000..ce638946e2b8
--- /dev/null
+++ b/sw/qa/core/data/docm/testParagraphFormat.docm
Binary files differ
diff --git a/sw/qa/core/data/docm/testSentences.docm b/sw/qa/core/data/docm/testSentences.docm
new file mode 100644
index 000000000000..5275307ddb02
--- /dev/null
+++ b/sw/qa/core/data/docm/testSentences.docm
Binary files differ
diff --git a/sw/qa/core/data/docm/testTables.docm b/sw/qa/core/data/docm/testTables.docm
new file mode 100644
index 000000000000..5d4502ade055
--- /dev/null
+++ b/sw/qa/core/data/docm/testTables.docm
Binary files differ
diff --git a/sw/qa/core/data/docm/testVBA.docm b/sw/qa/core/data/docm/testVBA.docm
new file mode 100644
index 000000000000..7b8495c0567d
--- /dev/null
+++ b/sw/qa/core/data/docm/testVBA.docm
Binary files differ
diff --git a/sw/qa/core/data/docm/testWords.docm b/sw/qa/core/data/docm/testWords.docm
new file mode 100644
index 000000000000..b88416bb77ed
--- /dev/null
+++ b/sw/qa/core/data/docm/testWords.docm
Binary files differ
diff --git a/sw/qa/core/data/html/pass/ofz-msan-1.html b/sw/qa/core/data/html/pass/ofz-msan-1.html
new file mode 100644
index 000000000000..5237a3d1dda2
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz-msan-1.html
Binary files differ
diff --git a/sw/qa/core/data/html/pass/ofz39850-1.html b/sw/qa/core/data/html/pass/ofz39850-1.html
new file mode 100644
index 000000000000..ebe25683cea4
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz39850-1.html
Binary files differ
diff --git a/sw/qa/core/data/html/pass/ofz40593-1.html b/sw/qa/core/data/html/pass/ofz40593-1.html
new file mode 100644
index 000000000000..43510d5d00b2
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz40593-1.html
Binary files differ
diff --git a/sw/qa/core/data/html/pass/ofz40766-1.html b/sw/qa/core/data/html/pass/ofz40766-1.html
new file mode 100644
index 000000000000..c0dff9de70f8
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz40766-1.html
Binary files differ
diff --git a/sw/qa/core/data/html/pass/ofz43310-1.html b/sw/qa/core/data/html/pass/ofz43310-1.html
new file mode 100644
index 000000000000..e84d1cccf5d7
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz43310-1.html
Binary files differ
diff --git a/sw/qa/core/data/html/pass/ofz5007-1.html b/sw/qa/core/data/html/pass/ofz5007-1.html
new file mode 100644
index 000000000000..f427c4c6069f
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz5007-1.html
@@ -0,0 +1 @@
+<table> <caption> <table><td></td><caption><table align="right"><td><MARQUEE> \ No newline at end of file
diff --git a/sw/qa/core/data/html/pass/ofz53680-1.html b/sw/qa/core/data/html/pass/ofz53680-1.html
new file mode 100644
index 000000000000..d7fbcb2ebbce
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz53680-1.html
Binary files differ
diff --git a/sw/qa/core/data/odt/tdf151846.odt b/sw/qa/core/data/odt/tdf151846.odt
new file mode 100644
index 000000000000..4f62ef9e81bc
--- /dev/null
+++ b/sw/qa/core/data/odt/tdf151846.odt
Binary files differ
diff --git a/sw/qa/core/data/ooxml/fail/LIBREOFFICE-DBDAZAEC.docx b/sw/qa/core/data/ooxml/fail/LIBREOFFICE-DBDAZAEC.docx
new file mode 100644
index 000000000000..add554ae9596
--- /dev/null
+++ b/sw/qa/core/data/ooxml/fail/LIBREOFFICE-DBDAZAEC.docx
Binary files differ
diff --git a/sw/qa/core/data/ooxml/fail/ofz37458-1.docx b/sw/qa/core/data/ooxml/fail/ofz37458-1.docx
new file mode 100644
index 000000000000..04e7d6062978
--- /dev/null
+++ b/sw/qa/core/data/ooxml/fail/ofz37458-1.docx
Binary files differ
diff --git a/sw/qa/core/data/ooxml/pass/fill.docx b/sw/qa/core/data/ooxml/pass/fill.docx
deleted file mode 100644
index b9a4501b2854..000000000000
--- a/sw/qa/core/data/ooxml/pass/fill.docx
+++ /dev/null
Binary files differ
diff --git a/sw/qa/core/data/rtf/fail/forcepoint-4.rtf b/sw/qa/core/data/rtf/fail/forcepoint-4.rtf
index ccd04d451b10..004fdeeca93d 100644
--- a/sw/qa/core/data/rtf/fail/forcepoint-4.rtf
+++ b/sw/qa/core/data/rtf/fail/forcepoint-4.rtf
@@ -1670,7 +1670,7 @@ YM1 6 #10 MP1 1+ SA #0}\line \tab {\b\f3 d5 0600 0800 #5 M5 #0}
\par {\pntext\pard\plain\f8\fs20\cf1 12.\tab}Using the occurrence specifier {\b\f3 5+} (e.g. 5th Friday) or {\b\f3 5}- (e.g. 5th from la
st Friday) in a month that does not contain 5 weeks does not generate an event and thus does not count against the duration. The same applies to providing a day of the month that does not occur in the month: 31st.
\par {\pntext\pard\plain\f8\fs20\cf1 13.\tab}\pard \s15\fi-360\li1224\sb100\sl-260\slmult0\nowidctlpar{\*\pn \pnlvlbody\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}
-The start time and date of an event must be in-sync with one of the event slots defined by its ocurrence rule. The following are not allowed:\line \line \tab Initial Appt Time:\tab {\b\f3 1300}\line \tab Recurrence Rule:\tab {\b\f3 \tab d1 1400 #5}\line
+The start time and date of an event must be in-sync with one of the event slots defined by its occurrence rule. The following are not allowed:\line \line \tab Initial Appt Time:\tab {\b\f3 1300}\line \tab Recurrence Rule:\tab {\b\f3 \tab d1 1400 #5}\line
\tab Initial Appt Date:\tab 7/1/94 (Friday)\line \tab Recurrence Rule:\tab \tab {\b\f3 W1 MO TH #5}\line \line The following are acceptable:\line \line \tab Initial Appt Time:\tab {\b\f3 1300}\line \tab Recurrence Rule:\tab {\b\f3 \tab d1 #5} or {\b\f3
d1 1300 #5}\line \tab Initial Appt Date:\tab 7/1/94 (Friday)\line \tab Recurrence Rule:\tab \tab {\b\f3 W1 MO FR #5} or {\b\f3 W1 #5}
\par {\pntext\pard\plain\f8\fs20\cf1 14.\tab}\pard \s15\fi-360\li1224\sb100\sl-260\slmult0\nowidctlpar{\*\pn \pnlvlbody\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}If the optional {\b\f3 <weekdaytime>} information is missing from a {\b\f3 <monthlybypos>}
@@ -1776,4 +1776,4 @@ YM1 6 9 10 #10 MP1 1+ 2+ 3+ 4+ 1- SA SU #1
\par \pard\plain \s25\li1224\sb100\sl-200\slmult0\nowidctlpar\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640 \f3\fs16\cf1 YD1 1 100 d1 #5 19990102T000000Z
\par \pard\plain \s15\li864\sb100\sl-260\slmult0\nowidctlpar \f8\fs20\cf1
-\par } \ No newline at end of file
+\par }
diff --git a/sw/qa/core/data/rtf/fail/forcepoint-82.rtf b/sw/qa/core/data/rtf/fail/forcepoint-82.rtf
new file mode 100644
index 000000000000..54b1dee42c5b
--- /dev/null
+++ b/sw/qa/core/data/rtf/fail/forcepoint-82.rtf
@@ -0,0 +1,28 @@
+{\rtf1
+{\trowd
+\clbrdrl\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\cellx2000
+\pard
+Text 1
+\itap0
+\cell
+\row}
+\pard
+\par
+\itap0
+{\trowd
+\clbrdrl\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\cellx2000
+\pard
+Text 2
+\itap0
+\cell
+\row}
+\itap-1
+{\trowd
+\clbrdrl\brdrs\brdrw2147483649\clbrdrr\brdrs\brdrw9\clbrdrt\brdrs\brdrw10\cló brdrb\brdrs\brdrw185\cellx1000
+\nestro󠀩w}
+\itap0
+\cell
+\row}
+\itap0
+\par
+} \ No newline at end of file
diff --git a/sw/qa/core/data/rtf/pass/forcepoint-105.rtf b/sw/qa/core/data/rtf/pass/forcepoint-105.rtf
new file mode 100644
index 000000000000..e6259953c638
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/forcepoint-105.rtf
@@ -0,0 +1,178 @@
+{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2147483649\fswiss\fcharset0\fprq2{\*\panose!020b0604020202020204}Arial;}
+{\f28\fscript\fcharset0\fprq2{\*\panose 03060802040406070304}Brush Script MT{\*\falt CommercialScript BT};}{\f234\froman\fcharset238\fprq2 Times New Roman CE;}{\f235\froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\f237\froman\fcharset161\fprq2 Times New Roman Greek;}{\f238\froman\fcharset162\fprq2 Times New Roman\fcharset162\fprq2 Times New Roman Tur;}{\f239\froman\fcharset177\fprq18446744073709551617 Times New Roman (Hebrew);}{\f240\froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\f241\froman\fcharset186\fprq2 Times Ne÷ Roman Baltic;}{\f242\fswiss\fcharset238\fprq2 Arial CE;}{\f1\fswiss\fcharset204\fprq2 Arial Cyr;}{\f245\fswiss\fcharset161\fprq2 Arial Greek;}{\f246\fswiss\fcharset162\fprq2 Arial Tur;}
+{\f247\fswiss\fcharset173\fprq2 Arial (Hebrew);}{\f212529020906218821751\fswiss\fcharset178\fprq2 @rial (Arabic);}{\f249\fswiss\fcharset186\fprq2 Arial Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;
+\red255\greeN0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\bluó ²e128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;
+\red192\green192\blue192;}{\stylesheet{\ql \li0\ri1\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\lAngfenp1033 TsnJxt0 Normal;}{\*\cs10 \additive Default Paragraph Font;}{\s0\ql \li0\ri0\widctlpar
+\tqc\tx4320\tqr\tx8640\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 header;}{\s16\ql \li0\ri0\widctlpar
+\tqc\tx4320ó ¦\tqr\tx8640\aspalpha\aspnum\faauto\adjustviiugg\sin0\lin0\itap0 \fs24\lang1033\langfe-805124778425426131\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext6363 footer;}}{\info{\title Service Report version 5.4.2}{\subject Noveon, Inc.}{\aqthor Michael A. Elkevizth}
+{\doccomm Boiler 7 annual maintenance.}{\operator Michael A. Elkevizth}{\creatim\yr2008\mo8\dy22\hr17\min22}{\revtim\yr2008\mo8\dy22\hr17\min22}{\version2}{\edmins0}{\nofpages1}{\nofwords216}{\nofchars1232}{\*\company Data Control Systems, Inc.}
+{\nofcharsws1512}{\vern8243}}\margl720\margr720 \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin720Ldgvorigin1440\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd \psz1\linex1\footery288\cols4\colsx0\endnhere\colno1colw1260\colsr2
+\colno3\colw3778\colsr2\colno1024\colw2518\colsr2\colno4\colw3238\sectlinegrid360\sectdefaultcl {\header \trowd
+\trgaph30\trrh360\trleft-30\tpvpg\tphmrg\tposxc\tposy720\tdfrmtxtLeft187\tdfrmtxtRight187\trftsWidth3\trwWidth11650\trftsWidthB3\trftsWidthA3\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3\tabsnoovrlp1 \clvertalt\clbrdrt\brdrdb\brdrw15 \clbrdrb\brdrdb\brdrw15
+\c,txlrtb\clftsWidth3\clwWidth750 \cellx720\clvertalt\clbrdrt\brdrdb\brdrw15 \clbrdrb\brdrdb\brdrw15 \cltxlrtb\clftsWidth3\clwWidth6300 \cellx7020\clvertalt\clbrdrt\brdrdb\brdrw15 \clbrdrb\brdrdb\brdrw15 \cìtxlrtb\clftsWidth3\clwWidth4600 \cellx11620
+\pard\plain \qs \li0\ri0\widctlpar\intbl\pvpg\phmrg\posxc\posy720\dxfrtext187\dfrmtxtx187\dfrmtxty0\faauto\rin0\lin0\absnoovrlp1 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20\cf1 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\pvpg\phmrg\posxc\posy720\dxfrtext187\dfrmtxtx187\dfrmtxty0\faauto\rin0\lin0\absnoovrlp1 {\b\f1\fs36\cf1 Data Control Systems\cell Service Report\cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\fs20\cf1 \trowd
+\trgaph30\trrh360\trleft-30\tpvpg\tphmrg\tposxc\tposy720\tdfrmtxtLeftq87\tdfrmtxtRight187\trftsWidth3\trwWidth11650\trftsWidthB3\trftsWidthA3\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3tabsnoovrlp1 \clvertalt\clbrdrt\brdrdb\brdrw15 \clbrdrb\brdrdb\brdrw15
+\cltxlrtb\clftsWidth3\clwWidth750 \cellx720\clvertalt\clbrdrt\brdrdb\brdrw15 \clbrdrb\brdrdb\brdrw15 \cltxlrtb\clftsWidth3^clwWidth6300 \cellx7020\clvertalt\clbrdrt\brdrdb\brdrw15 \clbrdrb\brdrdb\brdrw15 \cltxlrtb\clftsWidth3\clwWidth4600 \cellx11620\row
+}\trowd \trgaph30\trrh297\trleft-30\trkeep\tpvpg\trhmrg\tposxc\tposy720\tdfrmtxtLeft187\tdfrmtxtRight187\trftsWidth3\trwWidth11650\trftsWidthB3\trftsWidthA3\trpaddl30\trpaddr30\trpaddfl3\|rpaddfr3\tabsnoovrlp1 \clvmgf\clvertalt\clbrdrt\brdrdb\brdrw15
+\cltxlrtb\cnftsWidth3\clwWidth750 \cellx720\clvertalt\cltxlrtb\clftsWidth3\clwWidth5400 \cellx6120\clvertalt\cltxlrtb\clftsWidth3\clwWidth5500 \cellx11620\pard
+\qr \li0\ri0\widctlpar\intbl\pvpg\phmrg\posxc\posy720\dxfrtext187\dfrmtxtx187\dfrmtxty0\faauto\rin0\lin0\absnoovrlp1 {\f1\fs20\cf1 {\*\bkmkstart\bkmkcolf2\bkmkcoll3 EmailHere}\cell }\pard
+\ql \li0\ri0\widcôlpar\intbl\pvpg\phmrg\posxc\posy720\dxfrtext187\dfrmtxtx187\dfrmtxty0\faauto\rin0\lin0\absnoovrlp1 {\b\i\f1 13611 Kaufman Ave NW}{\f1\fs20\cf1 \cell }{\b\i\f1 E-Mail mike@dcsamerica.com \cell }\pard
+\ql \li0\ri0\widctlpar\inôbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\fs20\cf1 \trowd
+\trgaph30\trrh"97\trleft-30\trkeep\tpvpg\tphmrg\tposxc\tposy720\tdfrmtxtLeft187\tdfrmtxtRight187\trftsWidth3\trwWidth11650\trftsWidthB3\trpaddl30\trpáddr30\trpaddfl3\trpaddfr3\tabsnoovrlp1 \clvmrg\clvertalt\cltxlrtbclftsWidth3\clwWidth750 \cellx720
+\clvertalt\cltxlrtb\clftsWidth3\clwWidth5400 \cellx6120\clvertalt\cltxlrtb\clftsWidth3\clwWidth5500 \cellx11620\pard \qr \li0\ri0\widctlpar\intbl\pvpg\phmrg\posxc\posy720\dxfrtext187\dfrmtxtx187\dfrmtxty0\faauto\rin0\lin0\absnoovrlp1 {\f1\fs20\cf1
+{\*\bkmkend EmailHere}\cell }\pard \ql \li0\ri0\widctlpar\intbl\pvpg\phmrg\posxc\posy720\`xfrtext187\dfrmtxtx187\dfrmtxty0\faauto\rin0\lin0\absnoovrlp1 {\b\i\f1 Hartville, OH 64632}{\f1\fs20\cf1 \cell }{\f1\fs20\cf1 \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\fs20\cf1 \trowd
+\trgaph30\trrh293\trleft-30\trkeep\tpvpg\tphmrg\tposxc\tposy720\tdfrmtxtLeft187\tdfrmtxtRight187\trftsWidth3\trwWidth11650\trftsWidthB3\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3\tabsnoovrlp1 \clvmrg\clvertalt\cltxlrtb\clftsWidth3\clwWidth750 \cellx720
+\clvertalt\cltxlrtb\clftsWidth3\clwWidth5400 \cellx6120\clvertalt\cltxlrtb\blftsWidth3\clwWidth5500 \cellx340282366920938463463374607431768223077\row }\trowd
+\trgaph30\trrh307\trleft-30\trkeep\tpvpg\tphmrg\tposxc\tposy720\tdfrmtxtLeft187\tdfrmtxtRight187\trftsWidth3\trwWidth11650\trftsWidthB3\trftsWidthA3\trpaddl30\trpaddr30\trpaddfl3\trpaddfr3\tabsnoovrlp1 \clvmrg\clvertalt\cltxlrtb\clftsWidth3\clwWidti750
+\cellx720\clvertalt\cltxlrtb\clNoWrap\clftsWidth3\clwWidth5400 \cellx6120\clvertalt\cltxlrtb\clftsWidth3\clwWidth5500 \cellx11620\pard \qr \li0\ri0\widctlpar\intbl\pvpg\phmrg\posxc\posy720\dxfrtext187\dfrmtxtx187\dfrmtxty0\faauto\rin0\lin0\Absnoovrlp1 {
+\f1\fs20\cf1 \cell }\pard \ql \li0\ri0\widctlpar\intbl\tx7920\pvpg\phmrg\posxc\posy720\dxfrtext187\dfrmtxtx187\dfrmtxty0\faauto\rin0\lin0\absnoovrlp1 {\b\i\f1 Voice (330) 877-4497 FAX (330) 877/6107}{\f1\fs20\cf1 \cell \cell }\pard
+\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\f1\fs20\cf1 \trowd
+\trgaph30\trrh307\trleft-30\trkeep\tpvpg\tphmrg\tposxc\tposy720\tdfrmtxtLeft187\tdfrmtxtRight187\trftsWidth3\trwWidth11650\trftsWidthB3\trftsWidthA3\trpaddl30\tvpaddr30\trpaddfl3\trpaddfr3\tabsnoovrlp1 \clvmrg\clvertaltXcltxlrtb\clftsWidth3\clwidth750
+\cellx720\clvertalt\cltxlrtb\clNoWrap\clftsWidth3\clwWidth5400 \cellx6120\clvertalt\cltxlrtb\clftsWidth3\clwWidth5540 \cellx11620\row }\pard\plain \s15\ql \li0\ri0\widctlpar\tqc\tx4320\tqr\tx8640\aspal`ha\aspnum\faauto\adjustright\rin0\lin0\itap0
+\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
+\par }}{\footer \trowd \trgaph108\trrh347\trftsWidth3\trwWidth10800\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\cltxlrtb\clftsWidth3\clwWidth6315 \cellx6315\clvertalb\cltxlrtb\clftsWidth3\clwWidth4485 \cellx10800\pard\plain
+\ql \li0\ri0\widctlpar\intbl\aspalpha\asxnum\faauto\adjustrightTrin0\lin0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f28\fs56 Mike E.\cell }\pard \ql \li-123\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin-123
+{\field{\*\fldinst {\f1\fs20 if}{\fiuld{\*\fldinst {\f1\fs20 page }}{\fldrslt {\f1\fs20\lang1024\langfe1024\noproof 1}}}{\f1\fs20 =}{\field{\*\fldinst {\f1\fs20 numpages }}{\fldrslt {\f1\fs20\lang1024\langfe1024\noproof 1}}}{\f1\fs20 \cell }\pard\plain \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\trowd
+\trfaph108\trrh360\trftsWidth3\trwWidth10800\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\cltxlrtbLclftsWidth3\clwWidth3060 \cellx3060\clvertalt\cltxlrtb\clftsWidth3\clwWidth7740 \cellx10800\row }\pard\plain
+\s16\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\trowd
+\trfaph108\trrh360\trftsWidth3\trwWidth10800\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\cltxlrtbLclftsWidth3\clwWidth3060 \cellx3060\clvertalt\cltxlrtb\clftsWidth3\clwWidth7740 \cellx10800\row }\pard\plain
+\s16\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfe1024\noproof _____________________________________}}}{\f1\fs20 \cell }\pard \ql \li0\ri0\hang{\pntxta )}}
+{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\tntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8
+\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \qr \li0\ri0\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
+\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20
+\par }{\b\f1 Cust No:
+\par P.O. No:
+\par Job For:
+\par }{\f1\fs20
+\par
+\par
+\par }\pard \ql \li180\ri0\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin18 \itap0 {\f1\fs20 \column
+\par }\pard \ql \li360\ri0\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin360\itap0 {\f1\fs20 008
+\par }\pard \ql \li180\ri0\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin180\itap0 {\*\bkmkstart PONo}{\*\bkmkend PONo}{\field{\*\fldinst {\f1\fs20 MACROBUTTON none PO Number }}{\fldrslt }}{\f1\fs20
+\par {\*\bkmkstart JobForName}{\*\bkmkend JobForName}Noveon, Inc. SP&C Division
+\par }\pard \ql \li187\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin187\itap0 {\f1\fs20 240 W. Emerling Ave.
+\par Akron, OH 44301
+\par }\pard \qr \li360\ri187\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin187\lin360\itap0 {\f1\fs20 \column }{\b\f1\fs20 Ctrl No.
+\par }\pard \qr \li0\ri187\sl-280\slmult0\widctlpr\aspalpha\asrnum\faauto\adjustright\rin187\lin0\itap0 {\b\f1\fs20 Ctrl Date
+\par }{\f1\fs20
+\par }{\b\f1 Date(s):
+]Çp\as Calendar Days:
+\par Job Description:
+\par }\pard \ql \li63\ri187\sl-280\slmult0\whdctlpar\aspalpha\aspnum\faauto\adjustright\rin187\lin63\itap0 {\f1\fs20 \column {\*\bkmostart CtrlNo}{\*\bkmkend CtrlNo}}{\field{\*\fldinst {\f1\fs20 MACROBUTTON none Invoice Number }}{\fldrslt }}{\f1\fs20
+\par {\*\bkmkstart CtrlDate}{\*\bkmkend CtrlDate}}{\field{\*\fldinst {\f1\fs20 MACROBUTTON none Invoice Date }}{\fldrslt }}{\f1\fs20
+\par }\pard \ql \li90\ri187\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin187\lin90\itap0 {\f1\fs20
+\par }\pard \ql \li108\ri187\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin187\lin108\itap0 {\f1\fs20 {\*\bkmkstart Date}{\*\bkmkend Date}9/26/2005 and 9/27/2005
+\par }\pard \ql \li360\ri187\sl-25395\slmult0\widctlpar\aspalpja\aspnum\faauto\adjustright\rin187\lin360\itap0 {\f1\fs20 {\*\%nmksb%nt
+\ðar }\pard \ql \li108\ri187\sl-280\slmult0\widctlpar\aspalpha\aspnum\faautï\adjustright\rin187\lin108\itap0 {\f1\fs20 Boiler 7 annual maintenance.
+\par }\pard \ql \li0\ri187\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin187\lin0\itap0 {\f1\fs20
+\par
+\par }\pard \ql \li0\ri180\widctlpar\aspalpha\aspnum\faauto\adjustright\rin180\lin0\itap0 {\f1\fs20 \sect }\sectd \psz1\sbknone\linex0\footery432\cols4\endnhere\colno1\colw1260\colsr2\colno2\colw3236\colsr2\colno3\colw1980\colsr2
+\colno4\colw4318\sectlinegrid360\sectdefaultcl \pard\plain \qr \li0\ri0\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang103\langfe3033\cgrid\langnp1033\langfenp1033 {\b\f1 Contact:
+\par }\pard \qr \li0\ri0\sl-280\slmult0\widctlpar\tx1260\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\b\f1 Voice:
+\par FAX:
+\par }{\f1\fs20
+\par }\pard \ql \li187\ri187\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\b\f1 Voice:
+\par FAX:
+\par }{\f1\fs20
+\par }\pard \ql \li187\ri187\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin187\lin187\itap0 {\f1\fs20 \column George
+\par (555) 555-5555
+\par
+\par }\pard \qr \li180\ri180\widctlpar\tx-720\tx2700\aspalpha\aspnum\faauto\adjustright\rin180\lin180\itap0 {\f1\fs20 \column }{\b\f1 Bill To:
+\par }{\f1\fs20
+\par
+\par
+\par }\pard \ql \li0\ri187\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin187\lin0\itap0 {\f1\fs20 \column Noveon, Inc,
+\par }\pard \ql \li0\ri180\widctlpar\aspalpha\aspnum\faauto\adjustright\rin180\lin0\itap0 {\f1\fs20 PO Box 41256
+\par Brecksvilne, OH 44141
+\par
+\par
+\par \sect }\sectd \marglsxn540\psz1\sbknone\linex0\footery432\cols8\colsx0\endnhere\colno1\ãolw1430\colsr0\colno2\colw1067\colsr0\colno3\colw1067\colsr0|colno4\colw1423\colsr0\colno5\colw871476560\colsr0\colno6\colw1245\colsr0\colno7\colw995\colsr2
+\colno8\colw2160\sectlinegrid360\sectdefaultcl \pard\plain \qr \li180\ri7\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin7\lin180\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f1\fs20
+\par }{\b\f1 Srvc Days:
+\par Miles:
+\par Materials:
+\par Parts:
+\par Expenses:
+\par Total:
+\par }\pard \qc \li180\ri7\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin7\lin180\itap0 {\f1\fs20 \ãolumn
+\par }\pard \qc \li183\ri0\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin187\itap0 {\f1\fs20 1.3M
+\rar 60
+\par
+\par
+\par
+\par
+]bbb }\pard \qc \li180\ri7\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright]rin7\lin180\itap0 {\f1\fs20 \column }{\b\f1 Rate
+\par }\pard \qc \li187\ri0\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin187\ivap0 {\f1\fs20 $837.6
+\par $0.51
+\par
+\par
+\par
+\par
+\par }\pard \qc \li0\ri-17\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-17\lin0\itap0 {\f1\fs20 \column }{\b\f1 Totals
+\par }{\f1\fs20 $1088.88
+\par $30.6
+\par $0.0
+\par $0.0
+\par $0.0
+\par $1119.48
+\par }\pard \qc \li0\ri-1268\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-1268\lin0\itap0 {\f1\fs20 \column
+\par
+\par
+\par }\pard \qr \li0\ri43\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin43\lin0\itap0 {\f1\fs20
+\par }\pard \qc \li0\ri1091\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin1091\lin0\itap0 {\f1\fs20 \column
+\par
+\par }\pard \qc \li0\ri0\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\f1\fs20
+\par }\pard \qc \li0\ri-15\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-15\lin0\itap0 {\f1\fs20
+\par }\pard \qc \li0\ri0\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\f1\fs20 \column
+\par }\pard \qc \li0\ri1091\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin1091\lin0\itap0 {\f1\fs20
+\par }\pard \qc \li0\ri95\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin95\lin0\itap0 {\f1\fs20
+\par
+\par }\pard \qc \li-940\ri2160\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin2160\lin-900\itap0 {\f1\fs20 5\column
+\par }\pard \qc \li0\ri1091\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin1091\lin0\itap0 {\f1\fs20
+\par }\pard \qc \li8\ri1435\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin1435\lin0\itap0 {\f1\fs20
+\par
+\par }\pard \ql \li0\ri-1268\sl-280\slmult0\widctlpar\tx1440\aspalpha\aspnum\faauto\adjustright\rin-1268\lin0Litap0 {\f1\fs20
+\par }\pard \ql \li1980\ri-1270\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-1270\lin1980\itap0 {\f1\fs20 \sect }\sEctd \marglsxn540\margrsxn900\psz1\sbknone\linex0\footery432Ücols4\colsx0\endnhere\colno1\colw1618\colsr2
+\colno2\colw6957\colsr63\colno3\colw898\colsr2\colno4\colw1260\sectlinegrid360\sectdefaultcl \pard\plain \ql \li8129\ri2\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin2\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
+\f1\fs20\lang1024\langfe1024\noproof {\shp{\*\shpinst\shpleft540\shptop219\shpright11520\shpbottom219\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz1\shplid1027
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8193\dpline\dpptx0\dppty0\dpptx10980\dppty0\dpx540\dpy9223372036854775807\dpxsize10980\dpysize4\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}}{\f1\fs20
+\par
+\par }\pard \qr \li1\ri178\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin178\lin0\itap0 {\b\f1 Parts:\column
+\par }\pard \ql \li45\ri2\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin2\lin45\itap0 {\b\f1 Number / Description
+\par }\pard \ql \li72\ri2\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin2\lin72\itap0 {\f1\fs20 None
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par \column
+\par }\pard \qc \li0\ri2\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin2\lin0\itap0 {\b\f1 Qty
+\par }{\f1\fs20 \column
+\par }\pard \qc \li0\ri0\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\b\f1 Price Each
+\par }\pard \qc \li0\ri2\sl-280\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin2\lin0\itap0 {\f1\æs20
+\par }\pard \ql \li0\ri2\sl-280\slmult0\wi`ctlpar\aspalpha\aspnum\faauto\adjustright\rin2\lin0\itap0 {\æ1\fs20 \sect }\sectd \marglsxn540\psz1\sâknone\linex0\footery432\colsx0\endnhere\sectlinegrid360\sectdefaultcl \pard\plain \ql \li0\ri0\sl-280\slmult
+\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs1\lang1033\langfe1033\cgrid\langnp443297452496887406925\langfenp1033 {\f1\fs20\lang1024\langfe1025\noproof
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLayoutInCell}{^sv 1}}}{\s\dpx-360\dpy1\dpxsize11881\dpysize0\dplinew15\dplinecob170141183460469231731687303715884105727}}hprslt{\*\do\dobxcolumn\dobypara\dodhgt8192\dpline\dpptx0\dppty1\dpptx11880\dppty0
+{\shp{\*\shpinst\shpleft-1\shptop179\shpright11520\shpbottom179\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLayoutInCell}{^sv 1}}}{\s\dpx-360\dpy1\dpxsize11881\dpysize0\dplinew15\dplinecob1701411834604692317316873Õ03715884105727}}hprslt{\*ï¿¿\do\dobxcolumn\dobypara\dodhgt8192\dpline\dpptx0\dppty25651567448\dpptx11880\dppty0
+{\shp{\*\shpinst\shpleft-360\shptop179\shpright11520\shpbottom179\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLayoutInCell}{^sv 1}}}{\s\dpx-360\dpy1\dpxsize11881\dpysize0\dplinew15\dplinecob1701411834604692317316873Õ03715884105727}}hprslt{\*\do\dobxcolumn\dobypara\dodhgt8192\dpline\dpptx0\dppty1\dpptx11880\dppty0
+{\shp{\*\shpinst\shpleft-360\shptop179\shpright1\shpbottom179\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz-1\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipHumn\shpbxignore\shpbypara\shpbyignore\shpwr0\shpwrk256\shpfblwtxt2147483647\shpz0\shplid1026{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
diff --git a/sw/qa/core/data/rtf/pass/forcepoint-3.rtf b/sw/qa/core/data/rtf/pass/forcepoint-3.rtf
index 165d06d825cb..da593a04bab3 100644
--- a/sw/qa/core/data/rtf/pass/forcepoint-3.rtf
+++ b/sw/qa/core/data/rtf/pass/forcepoint-3.rtf
@@ -1 +1 @@
-{\rtf1\`nsi \ansicpg1252\stshfloch0{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green102\blue204;\red102\green99\blue0;\red143\green142\blue142;\red75\green60\blue52;}{\fonttbl{\f0\froman\cpg1257\fcharset186 Palatino Linotype;}{\f1\froman\cpg0\fcharset0 Palatino Linotype;}{\f2\froman\cpg1252\fcharset0 Palatino Linotype;}{\f3\fswiss\cpg1257\fcharset186 Arial Black;}{\f4\fswiss\cpg0\fcharset0 Arial Black;}{\f5\fswiss\cpg1252\fcharset0 Arial Black;}{\f6\froman\cpg1257\fcharset186 Times New Roman;}{\f7\froman\cpg0\fcharset0 Times New Roman;}{\f8\froman\cpg1252\fcharset0 Times New Roman;}{\f9\fmodern\cpg1257\fcharset186 Courier New;}{\f10\fmodern\cpg0\fcharset0 Courier New;}{\f11\fmodern\cpg1252\fcharset0 Courier New;}}{\stylesheet {\ql Normal;}{\s1\sbasedon0\ql\fi-120\sl-276\slmult0 Style1;}{\s2\sbasedon0\qj\fi560\sl-300\slmult0 Style2;}{\s3\sbasedon0\ql\sl-264\slmult0 Style3;}{\s4\sbasedon0\ql\fi-1088\sl-320\slmult0 Style4;}{\s5\sbasedon0\ql Style5;}{\s6\sbasedon0\ql Style6;}{\s7\sbasedon0\ql\sl-320\slmult0 Style7;}{\s8\sbasedon0\qr Style8;}{\s9\sbasedon0\ql Style9;}{\s10\sbasedon0\qj\sl-264\slmult0 Style10;}{\s11\sbasedon0\qj\sl-298\slmult0 Style11;}{\s12\sbasedon0\qj\sl-288\slmult0 Style12;}{\s13\sbasedon0\ql Style13;}{\s14\sbasedon0\ql\fi600\sl-329\slmult0 Style14;}{\s15\sbasedon0\ql\sl-240\slmult0 Style15;}{\s16\sbasedon0\ql Style16;}{\s17\sbasedon0\ql\fi576\sl-328\slmult0 Style17;}{\s18\sbasedon0\ql Style18;}{\s19\sbasedon0\ql\sl-271\slmult0 Style19;}{\s20\sbasedon0\ql\fi2406\sl-339\slmult0 Style20;}{\s21\sbasedon0\ql Style21;}{\s22\sbasedon0\ql\fi2821\sl-161\slmult0 Style22;}{\s23\sbasedon0\ql\fi568\sl-306\slmult0 Style23;}{\s24\sbasedon0\ql Style24;}{\s25\sbasedon0\ql Style25;}{\s26\sbasedon0\ql Style26;}{\s27\sbasedon0\ql Style27;}{\s28\sbasedon0\qj\sl-271\slmult0 Style28;}{\s29\sbasedon0\ql\fi568\sl-322\slmult0 Style29;}{\s30\sbasedon0\ql Style30;}{\s31\sbasedon0\ql Style31;}{\s32\sbasedon0\ql Style32;}{\s33\sbasedon0\ql Style33;}{\s34\sbasedon0\ql Style34;}{\s35\sbasedon0\ql Style35;}{\*\cs36\additive Default Paragraph Font;}{\*\cs37\sbasedon36\additive\b\charscalex120\f2\fs58 Font Style37;}{\*\cs38\sbasedon36\additive\b\charscalex30\f2\fs400 Font Style38;}{\*\cs39\sbasedon36\additive\i\f2\fs22 Font Style39;}{\*\cs40\sbasedon36\additive\scaps\f8\fs8 Font Style40;}{\*\cs41\sbasedon36\additive\i\b\f2\fs10 Font Style41;}{\*\cs42\sbasedon36\additive\f5\fs8 Font Style42;}{\*\cs43\sbasedon36\additive\b\expndtw200\f2\fs10 Font Style43;}{\*\cs44\sbasedon36\additive\f2\fs22 Font Style44;}{\*\cs45\sbasedon36\additive\b\expndtw-10\f2\fs22 Font Style45;}{\*\cs46\sbasedon36\additive\scaps\f2\fs20 Font Style46;}{\*\cs47\sbasedon36\additive\charscalex20\f2\fs104 Font Style47;}{\*\cs48\sbasedon36\additive\b\f2\fs20 Font Style48;}{\*\cs49\sbasedon36\additive\f2\fs22 Font Style49;}{\*\cs50\sbasedon36\additive\b\f2\fs38 Font Style50;}{\*\cs51\sbasedon36\additive\f2\fs20 Font Style51;}{\*\cs52\sbasedon36\additive\expndtw-20\f2\fs30 Font Style52;}{\*\cs53\sbasedon36\additive\i\expndtw-10\f2\fs22 Font Style53;}{\*\cs54\sbasedon36\additive\i\expndtw-20\f2\fs22 Font Style54;}{\*\cs55\sbasedon36\additive\f2\fs22 Font Style55;}{\*\cs56\sbasedon36\additive\f2\fs18 Font Style56;}{\*\cs57\sbasedon36\additive\b\expndtw10\f2\fs16 Font Style57;}{\*\cs58\sbasedon36\additive\b\f2\fs20 Font Style58;}{\*\cs59\sbasedon36\additive\i\b\expndtw-10\f11\fs22 Font Style59;}{\*\cs60\sbasedon36\additive\f2\fs20 Font Style60;}{\*\cs61\sbasedon36\additive\f2\fs12 Font Style61;}{\*\cs62\sbasedon36\additive\f2\fs18 Font Style62;}{\*\cs63\sbasedon36\additive\i\expndtw-20\f2\fs22 Font Style63;}{\*\cs64\sbasedon36\additive\b\expndtw-20\f2\fs26 Font Style64;}}\fet2{\*\ftnsep {\chftnsep\par }}{\*\aftnsep {\chftnsep\par }}\expshrtn\widowctrl\paperw20384\paperh12312\margl360\margr360\margt360\margb360 \sectd \sbknone\pgwsxn20384\pghsxn12312\marglsxn360\margrsxn360\margtsxn360\margbsxn360\titlepg\cols2\colno1\colw8632\colsr2104\colno2\colw8928 {\headerf }{\footerf }{\header \pard \plain \s11\ql\li720\fi0\ri9\sb0\sa0\tx2120 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \'e1\f0\cchs186 Ma\ul b\f0\cchs186 \'fb\f0\cchs186 s vaikai:\ul0 {\charscalex100\expndtw0\tab }\ul ir galimyb\f0\cchs186 \'eb\f0\cchs186 s\par }{\footer \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx0\posnegy0\absw0\absh-254\nowrap\dfrmtxtx34\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 100}}\par \pard \plain \s21\qr\li720\fi0\ri9{\sl-240\slmult0\fs20\par }\sb90\sa0 \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 101\par }\pard\sl-4680\slmult0\sb0\keepn\pvpara\dropcapli7\dropcapt1{\b\i0\ul0\cf0\highlight0\charscalex30\f0\fs400{i}\par}\pard \plain \s1\ql\li880\fi-880\ri0\sb0\sa0\sl-272\slmult0 \cs37\i0\strike0\nosupersub\b\scaps0\charscalex120\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs58 Hfc \cs55\b0\super\charscalex100\fs22 mddj8\nosupersub \super tUn\nosupersub \super tam\nosupersub \super dkrts\nosupersub identifikacijos proced\f0\cchs186 \'fb\f0\cchs186 ras, vadinasi \cs60\fs20 ivuiiy* toje \cs55\fs22 programoje \cs53\i\expndtw-10 asmenys \cs55\i0\expndtw0 turi mok\f0\cchs186 \'eb\f0\cchs186 ti naudotis identifikacijos \f0\cchs186 \'e1\f0\cchs186 ran-\cs60\fs20 *>*\f0\cchs186 \'ab\'f8\f0\cchs186 geb\f0\cchs186 \'eb\f0\cchs186 ti \cs55\fs22 analizuoti mokini\f0\cchs186 \'f8\f0\cchs186 veiklos produktus ir pati mokymosi proces\f0\cchs186 \'e0\f0\cchs186 , \cs60\f0\cchs186\fs20 \'95\f0\cchs186 tpaftistant \cs55\fs22 kriterijus, pagal kuriuos vaikas gali b\f0\cchs186 \'fb\f0\cchs186 ti priskirtas gabi\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 grupei. \cs60\fs20 Vargu, ar \cs55\fs22 bc specialaus \cs53\i\expndtw-10 pasirengimo \cs55\i0\expndtw0 gali dirbti mokytojas. Pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, Clark modelyje numatyta, kad mokytojas turi b\f0\cchs186 \'fb\f0\cchs186 ti \f0\cchs186 \'e1\f0\cchs186 vald\f0\cchs186 \'e6\f0\cchs186 s \f0\cchs186 \'e1\f0\cchs186 tampos klas\f0\cchs186 \'eb\f0\cchs186 je suma\f0\cchs186 \'fe\f0\cchs186 i\-nimo strategijas (autogenin\f0\cchs186 \'e6\f0\cchs186 treniruot\f0\cchs186 \'e6\f0\cchs186 , meditacij\f0\cchs186 \'e0\f0\cchs186 ), turi geb\f0\cchs186 \'eb\f0\cchs186 ti parinkti mo\-kymo med\f0\cchs186 \'fe\f0\cchs186 iag\f0\cchs186 \'e0\f0\cchs186 , pratimus ir u\f0\cchs186 \'fe\f0\cchs186 duotis, kurioms atlikti b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 naudojama abiej\f0\cchs186 \'f8 \f0\cchs186 smegen\f0\cchs186 \'f8\f0\cchs186 pusrutuli\f0\cchs186 \'f8\f0\cchs186 veikla, geb\f0\cchs186 \'eb\f0\cchs186 ti \f0\cchs186 \'e1\f0\cchs186 ugdymo turin\f0\cchs186 \'e1\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 traukti pratimus, kurie, panaudojant fizin\f0\cchs186 \'e1\f0\cchs186 k\f0\cchs186 \'fb\f0\cchs186 n\f0\cchs186 \'e0\f0\cchs186 , abstraktaus ir simbolinio lygmens \cs39\i informacij\f0\cchs186 \'e0\f0\cchs186 , \cs55\i0 trans\-formuoja \f0\cchs186 \'e1\f0\cchs186 konkretesn\f0\cchs186 \'e1\f0\cchs186 lygmen\f0\cchs186 \'e1\f0\cchs186 ir pan. Kai kurie autoriai, pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, Wil-liams, netgi nurodo mokymo strategijas, kurias \cs39\i naudoti savo \cs55\i0 darbe turi mok\f0\cchs186 \'eb\f0\cchs186 ti \cs60\fs20 mokytojas, \cs55\fs22 kiti savo darbo komand\f0\cchs186 \'e0\f0\cchs186 apmoko. Renzulli modelio realizavimo komand\f0\cchs186 \'e0\f0\cchs186 sudaro ne tik mokytojai, bet ir t\f0\cchs186 \'eb\f0\cchs186 vai, bendruomen\f0\cchs186 \'eb\f0\cchs186 s ekspertai, mo\-kyklos administracija ir kt. personalas. Modelio veikimo efektyvum\f0\cchs186 \'e0\f0\cchs186 vertina \cs53\i\expndtw-10 visi \cs39\expndtw0 jo \cs53\expndtw-10 dalyviai, pagal tokios analiz\f0\cchs186 \'eb\f0\cchs186 s \cs55\i0\expndtw0 rezultatus bei mokini\f0\cchs186 \'f8\f0\cchs186 pageidavimus ar pakitusius poreikius ugdymo programa modifikuojama.\par \pard \plain \s2\ql\li576\fi560\ri0\sb0\sa0\sl-296\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Atskirai reik\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 pamin\f0\cchs186 \'eb\f0\cchs186 ti Taylor model\f0\cchs186 \'e1\f0\cchs186 . Jis vadinamas ir muititalento, ir k\f0\cchs186 \'fb\f0\cchs186 rybinio bei kritinio m\f0\cchs186 \'e0\f0\cchs186 stymo modeliu. \cs39\i Laikoma, kad \cs55\i0 bent vienai (j\f0\cchs186 \'f8\f0\cchs186 nuro\-domos net devynios) gabumo sri\f0\cchs186 \'e8\f0\cchs186 iai yra gabus kiekvienas vaikas. Toks gabi\f0\cchs186 \'f8 \f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 \cs53\i\expndtw-10 ugdymo modelis tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti \cs39\expndtw0 priimtinas ir \cs55\i0\f0\cchs186 \'fe\f0\cchs186 mon\f0\cchs186 \'eb\f0\cchs186 ms, kurie mano, jog visi vaikai \cs60\fs20 turi \cs55\fs22 tam \cs53\i\expndtw-10 tikr\f0\cchs186 \'f8\f0\cchs186 \cs55\i0\expndtw0 gabum\f0\cchs186 \'f8\f0\cchs186 , ir d\f0\cchs186 \'eb\f0\cchs186 l koki\f0\cchs186 \'f8\f0\cchs186 nors prie\f0\cchs186 \'fe\f0\cchs186 as\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 nenori pripa\-\cs60\f0\cchs186\fs20 \'fe\f0\cchs186 inti \cs55\fs22 gabum\f0\cchs186 \'f8\f0\cchs186 \cs53\i\expndtw-10 lygmens \cs55\i0\expndtw0 skirtum\f0\cchs186 \'f8\f0\cchs186 . Modelio autorius nurodo \f0\cchs186 \'f0\f0\cchs186 ias gabum\f0\cchs186 \'f8\f0\cchs186 sritis: akademin\f0\cchs186 \'eb\f0\cchs186 s srities, \cs53\i\expndtw-10 produktyviojo \cs55\i0\expndtw0 m\f0\cchs186 \'e0\f0\cchs186 stymo, komuniJcavimo, prognozavimo, \cs53\i\expndtw-10 sprendim\f0\cchs186 \'f8\f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimo, plan\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 gyvendinimo, \cs55\i0\expndtw0\f0\cchs186 \'fe\f0\cchs186 mogi\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , galimybi\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\'fe\f0\cchs186 vel\-gimo \cs39\i\expndtw-20 (ir.\expndtw0 2.2.1 \cs53\expndtw-10 lentel\f0\cchs186 \'e6\f0\cchs186 ).\par \pard \plain \s11\qj\li6976\fi0\ri0{\sl-240\slmult0\fs20\par }\sb72\sa0 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 2.2.1 \cs55 lentel\f0\cchs186 \'eb\par \pard \plain \s8\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx6464\posnegy688\absw0\absh-256\dfrmtxtx40\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 U\f0\cchs186 \À§fe\f0\cchs186 duo\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 pavyzd\f0\cchs186 \'fe\f0\cchs186 iai\par \pard \plain \s4\qc\li2112\fi0\ri2232\sb0\sa0\sl-320\slmult0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0ó ½\f0\cchs186\lang1\langfe1063\fs22 Gabum\f0\cchs186 \'f8\f0\cchs186 \cs44\i0\expndtw0 ugdymas pagal Taylor \cs55 model\f0\cchs186 \'e1 \f0\cchs186 (pagal TayJor, 1986)\par \pard \plain \s9\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx2648\posnegy368\absw0\absh-328\dfrmtxtx40\dfrmtxty0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1063\fs22 Geb\f0\cchs186 \'eb\f0\cchs186 jimas \cs55\i0\expndtw0 susikurti \cs39\i atitinka- \{\f0\cchs186 \'84\f0\cchs186 Surinkite informacij\f0\cchs186 \'e0\f0\cchs186 apie... ii\par \pard \plain \s6\qj\li304\fi0\ri0\sb16\sa0 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 I \cs53\expndtw -10 Gabum\f0\cchs186 \'f8\f0\cchs186 sritis Paai\f0\cchs186 \'f0\f0\cchs186 kinimas\par \pard \plain \s10\qj\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \pvpara\phcol\posnegx6032\posnegy328\absw2600\absh-544\dfrmtxtx40\dfrmtxty0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-170141183460469231731687303715884105727\dn0\f0\cchs186\lang1063\langfe1063\fs22 j mos temos \f0\cchs186 \'fe\f0\cchs186 ini\f0ó €\cchs186 \'f8\f0\cchs186 ir \f0\cchs186 \'e1\f0\cchs186 g\f0\cchs186 \'fb\f0\cchs186 d\f0\cchs186 \'fe\f0\cchs186 i\f0\cchs186 \'f8 \cs55\i0\expndtw0\f0\cchs186 'baz\f0\cchs186 \'e6\f0\cchs186 .\par \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \pvpara\phcol\posnegx5672\posnegy384\absw2960\absh-584\dfrmtxtx40\dfrmtxty0 \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 kuo \f0\cchs186 \'e1\f0\cchs186 vairesni\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'f0\f0\cchs186 altini\f0\cchs186 \'f8\f0\cchs186 ir j\f0\cchs186 \'e0\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 a\-nalizuokite".\pCar \+/v+pard \plain \s11\ql\li0\fi0\ri0\sb0\sa0\sl-296\slmult0\tlul\tx2520 \pvpara\phcol\posnegx5856\posnegy896\absw2776\absh-1656\dfrmtxtx40\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 f Geb\f0\cchs186 \'eb\f0\cchs186 jimas generuoti \cs60\fs20 ne-\line \cs55\fs22 f \f0\cchs186 \'e1\f0\cchs186 prastas, originalias i\f0\cchs186 \'eb\f0\cchs186 /as,\line \cs60\fs20 f\cs53\i\expndtw-10\fs22 pasteb\f0\cchs186 \'eb\'fb\f0\cchs186 naujus \cs55\i0\expndtw0 s\f0\cchs186 \'e0\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 ius,\line \cs53\i\expndtw-10 | papildyti detal\f0\cchs186 \'eb\f0\cchs186 mis, \cs55\i0\expndtw0 kurios\line \cs53\i\expndtw-10\f0\cchs186 \'c1\f0\cchs186 pa\f0\cchs186 \'e1\f0\cchs186 vairioa id\f0\cchs186 \'eb\f0\cchs186 jas,\expndtw0 {\charscalex100\expndtw0\tab }\par \pard \plain \s6\qj\li232\fi0\ri0\sb0\sa0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1 063\fs22 'Akademin\f0\cchs186 \'eb\par \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-272\slmult0 \pvpara\phcol\posnegx5264\posnegy160\absw3368\absh-648\dfrmtxtx40\dfrmtxty0 \cs39\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \'84\f0\cchs186 Sukurkite, kuo \cs60\i0\fs20 pakeisti \f0\cchs186 \'e258\f0\cchs186 prastas energijos r\f0\cchs186 \'fb\'f0\f0\cchs186 is".\par \pard \plain \s7\ql\li0\fi0\ri0\sb0\sa0\sl-320\slmult0 \cs39\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\laangfe1063\fs22 (K\f0\cchs186 \'fb\f0\cchs186 rybos, produktyvioio\par \pard \plain \s13\qj\li5816\fi0\ri0\sb88\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 2.2.1 icntcU\par \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-240\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Gabum\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 sritis\par \pard \plain \s15\ql\li0\fi40\ri0\sb0\sa0\sl-240\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Sprendim\f0\cchs186 \'f8 \f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimo\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-248\slmult0\tlul\tx2736 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Paai\f0\cchs186 \'f0\f0\cchs186 kinimas {\charscalex100\expndtw0\tab }Ll\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas rasti alternatyvas, \cs55\fs22 l.,\par \pard \plain \s15\ql\li32\fi-32\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 jas \f0\cchs186 \'e1\f0\cchs186 vertinti ir priimti tinka- \cs55\fs22 t \cs60\fs20 r m\f0\cchs186 \'e0\f0\cchs186 problemos sprendim\f0\cchs186 \'e0\f0\cchs186 . 1 \cs41\b\i\f0\cchs186\fs10 \'e1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 J\f0\cchs186 \'fe\f0\cchs186 duo\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 pavyzd\f0\cchs186 \'fe\f0\cchs186 iai Nurodykite \cs60\fs20 savo \cs55\fs22 m\f0\cchs186 \'eb\f0\cchs186 giamiausi\f0\cchs186 \'e0\f0\cchs186 \cs60\fs20 I\par \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 a\f0\cchs186 \'f0\f0\cchs186 y toj\f0\cchs186 \'e0\f0\cchs186 , ai\f0\cchs186 \'f0\f0\cchs186 kiai pagr\f0\cchs186 \'e1\f0\cchs186 sdami at- t \cs60\fs20 rumentais \cs55\fs22 savo pasirinkim\f0\cchs186 \'e0\f0\cchs186 it\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 itmetim\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Planavimo\cell \pard \plain \s15\ql\li16\fi-16\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas numatyti kelius ir b\f0\cchs186 \'fb\f0\cchs186 dus id\f0\cchs186 \'eb\f0\cchs186 jai \f0\cchs186 \'e1\f0\cchs186 gyvendinti, nustatant, koki\f0\cchs186 \'f8\f0\cchs186 reikia resur- \cs55\fs22 1 \cs60\fs20 s\f0\cchs186 \'f8\f0\cchs186 , \f0\cchs186 \'e1\'fe\f0\cchs186 velgiant, kokios gali\-mos problemos, ir numatant \f0\cchs186 \'fe\f0\cchs186 ingsnius j\f0\cchs186 \'f8\f0\cchs186 sprendimui, to\-kiu b\f0\cchs186 \'fb\f0\cchs186 du patobulinant plan\f0\cchs186 \'e0\f0\cchs186 .\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 .I\f0\cchs186 \'f0\f0\cchs186 studijav\f0\cchs186 \'e6\f0\cchs186 \cs55\fs22 mitus apie \f0\cchs186 \'f0\f0\cchs186 ik\f0\cchs186 \'f0\f0\cchs186 nos\-\cs60\fs20 parnius, \cs55\fs22 sukurkite tyrimo plan\f0\cchs186 \'e0\f0\cchs186 \cs62\fs18 1\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 savo draug\f0\cchs186 \'f8\f0\cchs186 \cs55\fs22 nuomonei \cs60\fs20 apie \f0\cchs186 \'f0\f0\cchs186 iuos gyv\f0\cchs186 \'fb\f0\cchs186 nus i\f0\cchs186 \'f0\f0\cchs186 tirti\super 41\nosupersub , \f0\cchs186 \'84\f0\cchs186 Sukurkite akcijos prie\f0\cchs186 \'f0\f0\cchs186 \cs55\fs22 r\f0\cchs186 \'fb\f0\cchs186 kym\f0\cchs186 \'e0\f0\cchs186 \cs62\fs18 1 \cs60\fs20 plan\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\br\cchs186 \'f0\f0\cchs186 ius.\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 I\f0\cchs186 \'f0\f0\cchs186 studijuokite N sutart\f0\cchs186 \'e1\f0\cchs186 ir nurodykite \f0\cchs186 \'e1\f0\cchs186 vairias galimas jos i ratifikavimo pasekmes".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Komunikavimo\cell \pard \plain \s15\ql\li0\fi16\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas reik\f0\cchs186 \'f0\f0\cchs186 ti savo id\f0\cchs186 \'eb\f0\cchs186 jas, jausmus, poreikius ir suprasti kitus, vartojant verbalin\f0\cchs186 \'e6\f0\cchs186 ir neverbalin\f0\cchs186 \'e6\f0\cchs186 kalb\f0\cchs186 \'e0\f0\cchs186 .\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 Pademonstruokite savo jaus- \cs55\fs22 1 \cs60\fs20 mus, kai su\f0\cchs186 \'fe\f0\cchs186 inote apie ... \f0\cchs186 \'84\f0\cchs186 Papasakokite apie \f0\cchs186 \'e1\f0\cchs186 vyk\f0\cchs186 \'e1\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 vaiko i ir i\f0\cchs186 \'f0\f0\cchs186 suaugusiojo pozicini". i\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Plan\f0\cchs186 \'f8\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'e1\f0\cchs186 gyvendinimo\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas \f0\cchs186 \'e1\f0\cchs186 gyvendinti plan\f0\cchs186 \'e0\cell \pard \plain \s16\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs43\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw200\dn0\f0\cchs186\lang1063\langfe1063\fs10 \'97\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \f1\cchs186 \u9632\'3f\f0\cchs186 - \f0\cchs186 \'97\'97\f0\cchs186  \expndtw0 *-\expndtw200 \expndtw0 L-\expndtw200 \expndtw0 -\expndtw200 \cs42\b0\expndtw0\f3\cchs186\fs8 i \f4\cchs186 \u9632\'3f\f3\cchs186 \f4\cchs186 \u9632\'3f\f3\cchs186 \cs41\b\i\f0\cchs186\fs10 a \cs40\b0\i0\scaps\f6\cchs186\fs8 - ii \f7\cchs186 \u9632\'3f\f6\cchs186 \cs62\scaps0\f0\cchs186\fs18 1\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 Sukurkite ir \f0\cchs186 \'e1\f0\cchs186 gyvendinkite N 1 renginio plan\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Prognozavimo\cell \pard \plain \s15\ql\li0\fi8\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas numatyti ir pati\-krinti prie\f0\cchs186 \'fe\f0\cchs186 asties ir pasekm\f0\cchs186 \'eb\f0\cchs186 s s\f0\cchs186 \'e0\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 ius.\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 I\f0\cchs186 \'f0\f0\cchs186 studijuokite N sutart\f0\cchs186 \'e1\f0\cchs186 ir nurodykite \f0\cchs186 \'e1\f0\cchs186 vairias galimas jos i ratifikavimo pasekmes".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Komunikavimo\cell \pard \plain \s15\ql\li0\fi16\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Taylor siekia ugdyti kuo daugiau gabum\f0\cchs186 \'f8\f0\cchs186 , kuriais, jo manymu, pasi\f0\cchs186 \'fe\f0\cchs186 ymi vaikai. Tad kuo \f0\cchs186 \'e1\f0\cchs186 vairesniems vaik\f0\cchs186 \'f8\f0\cchs186 gabumams mokytojas skirs d\f0\cchs186 \'eb\f0\cchs186 mes\f0\cchs186 \'e1\f0\cchs186 , tuo daugiau galimybi\f0\cchs186 \'f8\f0\cchs186 , kad vaikas ras srit\f0\cchs186 \'e1\f0\cchs186 , kurios \f0\cchs186 \'fe\f0\cchs186 inovu jis gali tapti. Ta\f0\cchs186 \'e8\f0\cchs186 iau pir\-masis \f0\cchs186 \'f0\f0\cchs186 io modelio etapas - tai vis d\f0\cchs186 \'eb\f0\cchs186 lto akademini\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 ugdymas. Kitas \f0\cchs186 \'fe\f0\cchs186 ingsnis, skirtas mokytojui apsispr\f0\cchs186 \'e6\f0\cchs186 sti, kuri\f0\cchs186 \'e0\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 likusi\f0\cchs186 \'f8\f0\cchs186 a\f0\cchs186 \'f0\f0\cchs186 tuoni\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 sri\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8 \f0\cchs186 jis imasi ugdyti. Paprastai seka, anot autoriaus, tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti tokia: produktyvusis m\f0\cchs186 \'e0\f0\cchs186 stymas, planavimas, sprendim\f0\cchs186 \'f8\f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimas, pian\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 gyvendinimas, \f0\cchs186 \'e1\'fe\f0\cchs186 valgos. Akivaizdu, jog dirbti pagal \f0\cchs186 \'f0\'e1\f0\cchs186 model\f0\cchs186 \'e1\f0\cchs186 mokytojas tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti specialiai pasi\-reng\f0\cchs186 \'e6\f0\cchs186 s, tad modelio autorius si\f0\cchs186 \'fb\f0\cchs186 lo kelet\f0\cchs186 \'e0\f0\cchs186 mokytojo darbo metod\f0\cchs186 \'f8\f0\cchs186 . Pirmuouiu atveju si\f0\cchs186 \'fb\f0\cchs186 loma papildom\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 ugdym\f0\cchs186 \'e0\f0\cchs186 organizuoti baigiantis pamokoms. \f0\cchs186 \'c1\f0\cchs186 prastinis mokymo turinys \f0\cchs186 \'84\f0\cchs186 suspaud\f0\cchs186 \'fe\f0\cchs186 iamas" laike, o atsiradusias 5\f0\cchs186 \'97\f0\cchs186 10 laisvuj minu\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 mokytojas gali i\f0\cchs186 \'f0\f0\cchs186 naudoti pasirinkto gabumo ugdymui. Kai \cs48\b\fs20 mokytojui \cs44\b0\fs22 atrodo, kad jau pasiekta tam tikra pa\f0\cchs186 \'fe\f0\cchs186 anga ugdant pirm\f0\cchs186 \'e0\f0\cchs186 j\f0\cchs186 \'e1\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 o pasirinkt\f0\cchs186 \'f8\f0\cchs186 ga\-\par \sect\sectd \sbkpage\pgwsxn20855\pghsxn13316\marglsxn1080\margrsxn8026\margtsxn360\margbsxn360\cols2\colno1\colw7936\colsr2482\colno2\colw1329 {\header \pard \plain \s11\ql\li0\fi0\ri-7657\sb0\sa0\tx2245 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \'e1\f0\cchs186 Ma\ul b\f0\cchs186 \'fb\f0\cchs186 s vaikai:\ul0 {\charscalex100\expndtw0\tab }\ul ir galimyb\f0\cchs186 \'eb\f0\cchs186 s\par }{\footer \par \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx-720\posnegy0\absw0\absh-254\nowrap\dfrmtxtx34\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 100}}\par \pard \plain \s21\qr\li0\fi0\ri-7657{\sl-240\slmult0\fs20\par }\sb90\sa0 \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 101\par }{\shp {\*\shpinst \shpleft13358\shptop593\shpright14748\shpbottom830\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz1\shplid1{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 317500}}{\sp{\sn dyWrapDistBottom}{\sv 198755}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s31\qj\li0\fi0\ri0\sb0\sa0 \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Rai\f0\cchs186 \'f0\f0\cchs186 kos \cs51\b0 b\f0\cchs186 \'fb\f0\cchs186 dai\par }}}{\shp {\*\shpinst \shpleft11859\shptop534\shpright13172\shpbottom2169\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz0\shplid0{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 279400}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-254\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas\par \pard \plain \s13\ql\li0\fi0\ri0\sb17\sa0\sl-271\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Ugdytojo ir ugdytini\f0\cchs186 \'f8 \f0\cchs186 s\f0\cchs186 \'e0\f0\cchs186 veika, ko\-munikacija\par }}}{\shp {\*\shpinst \shpleft13350\shptop1144\shpright17594\shpbottom2296\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz2\shplid2{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 139700}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-271\slmult0 \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Informacijos srautai \f0\cchs186 \'97\f0\cchs186 \cs48\b Asmenvb\f0\cchs186 \'eb\f0\cchs186 s tobuli* tiesioginiai ir \cs60\b0 gr\f0\cchs186 \'e1\'fe\f0\cchs186 tamieji, ir s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs48\b tobulintai pedagogin\f0\cchs186 \'eb\f0\cchs186 \cs60\b0 sistema sudarymas: \cs48\b\f0\cchs186 \'fb\f0\cchs186 ssionj\par \pard \plain \s33\ql\li2499\fi0\ri0\sb93\sa0 \cs51\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 - b. \cs60 y\super 1\nosupersub "\super 0\nosupersub \cs51 HBB\par }}}{\shp {\*\shpinst \shpleft13299\shptop2228\shpright14205\shpbottom2474\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz4\shplid4{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Saviugda\par }}}{\shp {\*\shpinst \shpleft15874\shptop2279\shpright17187\shpbottom2524\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz5\shplid5{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0 \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Tobulinimasis\par }}}{\shp {\*\shpinst \shpleft11867\shptop2152\shpright13078\shpbottom2812\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz3\shplid3{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 640080}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Individo as\-menyb\f0\cchs186 \'eb\par }}}{\shpgrp{\*\shpinst \shpleft-720\shptop3939\shpright7878\shpbottom12384\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz6\shplid6{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0%n%nsp%nn% dyWrapDistBottom}{\sv 0}}{\sp{\sn groupLeft}{\sv 1067}}{\sp{\sn groupTop}{\sv 6209}}{\sp{\sn groupRight}{\sv 9665}}{\sp{\sn groupBottom}{\sv 14654}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 1067}}{\sp{\sn relTop}{\sv 6429}}{\sp{\sn relRight}{\sv 9665}}{\sp{\sn relBottom}{\sv 14654}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li474\fi0\ri0\sb0\sa0\sl-271\slmult0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1 \cs48\b\fs20 Ugdymo \cs49\b0\fs22 res \cs46\scaps\fs20 f\cs48\b\scaps0 lyb\f0\cchs186 \'eb\f0\cchs186 s lygmu\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 i- \cs49\b0\fs22 Strukt\f0\cchs186 \'fb\f0\cchs186 rini \cs48\b\fs20 o elementas\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 s Rai\f0\cchs186 \'f0\f0\cchs186 kos b\f0\cchs186 \'fb\f0\cchs186 dai\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Funkcijos\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li440\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 j \cs48\b\fs20 Valstybinis\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Valstyb\f0\cchs186 \'eb\f0\cchs186 s politika\cell \pard \plain \s19\ql\li0\fi8\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'d0\f0\cchs186 vietimo politika ir j\f0\cchs186 \'e0 \f0\cchs186 atspindintys \f0\cchs186 \'e1\f0\cchs186 statymai\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Teisinis reguliavimas, u\f0\cchs186 \'fe\f0\cchs186 tikrinantis kiekvie\-nam vaikui (vadinasi, ir gabiam) teis\f0\cchs186 \'e6\f0\cchs186 gauti jo poreikius ir galimybes atitinkant\f0\cchs186 \'e1\f0\cchs186 ugdym\f0\cchs186 \'e0\f0\cchs186 ir ug\-dymosi s\f0\cchs186 \'e0\f0\cchs186 lygas\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li390\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Visuomeninis\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Visuomen\f0\cchs186 \'eb\f0\cchs186 s institutai\cell \pard \plain \s19\ql\li0\fi68\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Vyriausybines insti\-tucijos/ visuomenini\f0\cchs186 \'f8 \f0\cchs186 organizacij\f0\cchs186 \'f8\f0\cchs186 /paramos fond\f0\cchs186 \'f8\f0\cchs186 /auk\f0\cchs186 \'f0\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 moky\-kl\f0\cchs186 \'f8\f0\cchs186 /mokslo institucij\f0\cchs186 \'f8 \cs39\b0\i\f0\cchs186\fs22 tikslin\f0\cchs186 \'eb\f0\cchs186 \cs48\i0\b\fs20 veikla\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Veiklos inicijavimas; koordinavimas, organi\-zavimas, informacijos kaupimas, analiz\f0\cchs186 \'eb\f0\cchs186 ir sklai\-da; gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 paie\f0\cchs186 \'f0\f0\cchs186 kos programos, identifikavi\-mas, globa; mokytoj\f0\cchs186 \'f8\f0\cchs186 ir kit\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'f0\f0\cchs186 vietimo darbuotoj\f0\cchs186 \'f8 \f0\cchs186 rengi mas;ugdymo t\f0\cchs186 \'e6\f0\cchs186 sti\-numo u\f0\cchs186 \'fe\f0\cchs186 tikrinimas; kt.\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 1 Institucinis\par \pard \plain \s25\ql\li0\fi0\ri0\sb0\sa0\sl-983\slmult0 \intbl \cs47\b0\i0\strike0\nosupersub\scaps0\charscalex20\expndtw0\dn19\f0\cchs186\lang1063\langfe1063\fs104 1\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Ugdymo nstituci\f0\cchs186 \'e1\f0\cchs186 os\par \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 i \cs49\b0\fs22 1 \cs48\b\fs20 i\par \pard \plain \s26\ql\li0\fi0\ri0\sb0\sa0\sl-381\slmult0 \intbl \cs50\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn5\f0\cchs186\lang1063\langfe1063\fs38 !\cell \pard \plain \s19\ql\li25\fi-25\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo modelis institucijos lygmeniu \f0\cchs186 \'97\f0\cchs186 mokyklos, papildomojo ugdymo mokyklos, technin\f0\cchs186 \'eb\f0\cchs186 s \{\f0\cchs186 \'fb\f0\cchs186 rybos namai, klas\f0\cchs186 \'eb\f0\cchs186 s, tovyklos, kursai, kon\-kursai ir kt.\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Ugdymo proceso opti\-mizavimas: optimalios ugdymo(si) aplinkos sudarymas, ugdymas, mo\-kymas, veiklos rezultat\f0\cchs186 \'f8 \f0\cchs186 vertinimas, mokymo dife\-rencijavimas ir kt.\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 3371}}{\sp{\sn relTop}{\sv 6209}}{\sp{\sn relRight}{\sv 7988}}{\sp{\sn relBottom}{\sv 6497}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s18\qj\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Gabi\f0\cchs186 \'f8\f0\cchs186 \cs49 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo ir jo s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 modelis\par }}}}}\pard \plain \s14\qr\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 m\f0\cchs186 \'e0\f0\cchs186 gali apib\f0\cchs186 \'fb\f0\cchs186 dinti asmenyb\f0\cchs186 \'eb\f0\cchs186 s saviugda, iritrapersonaliniame lygmenyje \f0\cchs186 \'e1\f0\cchs186 gyjanti gryn\f0\cchs186 \'e0\f0\cchs186 rai\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'e0\f0\cchs186 . \cs45\b\expndtw-10 II \cs55\b0\expndtw0 esm\f0\cchs186 \'eb\f0\cchs186 s \cs53\i\expndtw-10 vis\f0\cchs186 \'f8\f0\cchs186 \cs55\i0\expndtw0 anks\f0\cchs186 \'e8\f0\cchs186 iau min\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 rini\f0\cchs186 \'f8\f0\cchs186 element\f0\cchs186 \'f8\f0\cchs186 funkcionavi\-mo tikslas \cs49 I \cs55 prigimtini\f0\cchs186 \'f8\f0\cchs186 asmens gali\f0\cchs186 \'f8\f0\cchs186 pl\f0\cchs186 \'eb\f0\cchs186 tra ir i\f0\cchs186 \'f0\f0\cchs186 vystymas jo paties j\f0\cchs186 \'eb\f0\cchs186 gomis iki maksimalaus tam asmeniui galimo lygio. Literat\f0\cchs186 \'fb\f0\cchs186 roje (Gross, 1995; Almonaitien\f0\cchs186 \'eb\f0\cchs186 , 1997; Heller, 1999; Gagne, 2004 ir kt.) nurodoma, kad gabaus vaiko savirealizaci\-jai turi (takos jo asmenyb\f0\cchs186 \'eb\f0\cchs186 s nekognityvin\f0\cchs186 \'eb\f0\cchs186 s savyb\f0\cchs186 \'eb\f0\cchs186 s - pasiekim\f0\cchs186 \'f8\f0\cchs186 motyvacija, tei\-giamas \cs45\b\expndtw-10 sav\f0\cchs186 \'e6\f0\cchs186 s \cs55\b0\expndtw0 vertinimas, darbingumas, savikontrol\f0\cchs186 \'eb\f0\cchs186 ir kt. Yra pagrindo manyti, kad tinkamas min\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 GAVUS modelio strukt\f0\cchs186 \'fb\f0\cchs186 rini\f0\cchs186 \'f8\f0\cchs186 element\f0\cchs186 \'f8\f0\cchs186 funkcionavimas palankiai veikia gabaus vaiko asmenyb\f0\cchs186 \'e6\f0\cchs186 , taigi skatina \cs45\b\expndtw-10 j\f0\cchs186 \'e1\f0\cchs186 \cs55\b0\expndtw0 tobul\f0\cchs186 \'eb\f0\cchs186 s lygmuo\par \pard \plain \s11\qj\li0\fi0\ri0\sb42\sa0\sl-246\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Interpersona-linis\chftn{\footnote\pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \chftn Pastaba. Interpersonalinio ir intrapersonalinio \cs48\b\fs20 lygmens \cs55\b0\fs22 elemcr\cs48\b\f0\cchs186\fs20 \'a3\f0\cchs186 E\cs52\b0\expndtw-20\fs30 ^^PK\cs48\b\expndtw0\fs20 ^niaj\par \pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 modelio elementai, kuri\f0\cchs186 \'f8\f0\cchs186 optimaliam veikimui \cs49 ir skirtas ug\strike dy\strike0 m\strike o\strike0 \cs55 s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 mo\-\cs55\fs22 delis\par \pard \plain \s23 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Sukurtasis \expndtw0 GAVUS\expndtw-20 modelis turi savo strukt\f0\cchs186 \'fb\f0\cchs186 r\f0\cchs186 \'e0\f0\cchs186 , funkcijas \cs53\expndtw-10 ir \cs63\expndtw0 funkcionavimo\expndtw-20 \expndtw0 aptin-\cs53\expndtw-10 k\f0\cchs186 \'e0\f0\cchs186 . \cs63\expndtw-20 Modelis turi \expndtw0 paskirti\expndtw-20 bendr\f0\cchs186 \'e0\f0\cchs186 tiksl\f0\cchs186 \'e0\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \cs49\i0\expndtw0 sudaryti s\f0\cchs186 \'e0\f0\cchs186 lygas gdym\f0\cchs186 \'e0\f0\cchs186 ir galimybes saviugdai, pad\f0\cchs186 \'eb\f0\cchs186 ti jam ir skatinti vaik\f0\cchs186 \'e0\f0\cchs186 siekti pilno savojo gabum\f0\cchs186 \'f8\f0\cchs186 po\-tencialo realizavimo ir b\f0\cchs186 \'fb\f0\cchs186 ti naudingam visuomenei, Sis tikslas suteikia modeliui vienov\f0\cchs186 \'eb\f0\cchs186 s, vientisumo.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Kiekvienas strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas turi ir papildom\f0\cchs186 \'f8\f0\cchs186 (i\f0\cchs186 \'f0\f0\cchs186 vestini\f0\cchs186 \'f8\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 ben\-drojo) tiksl\f0\cchs186 \'f8\f0\cchs186 , kurie susij\f0\cchs186 \'e6\f0\cchs186 su funkcijomis, kurias atlieka strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas. Modelis skirtas \f0\cchs186 \'fe\f0\cchs186 mogui, jame vyksta informacijos perdavimo ir valdymo pro\-cesai \f0\cchs186 \'97\f0\cchs186 tai b\f0\cchs186 \'fb\f0\cchs186 dinga visuomenin\f0\cchs186 \'eb\f0\cchs186 ms sistemoms.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis sudarytas i\f0\cchs186 \'f0\f0\cchs186 posistemi\f0\cchs186 \'f8\f0\cchs186 (pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, GVU atskiroje ugdymo institucijoje, jo posistem\f0\cchs186 \'eb\f0\cchs186 - pedagogin\f0\cchs186 \'eb\f0\cchs186 sistema, ir kt.). Visi GAVUS elementai yra vienaip ar kitaip susij\f0\cchs186 \'e6\f0\cchs186 su ugdymu ir jo funkcijomis: \f0\cchs186 \'f0\f0\cchs186 vietimu, lavinimu, aukl\f0\cchs186 \'eb\f0\cchs186 jimu, mokymu, globojimu, formavimu ir kt. Kiekviena jo sud\f0\cchs186 \'eb\f0\cchs186 tin\f0\cchs186 \'eb\f0\cchs186 dalis atlieka tam tikr\f0\cchs186 \'e0\f0\cchs186 funkcij\f0\cchs186 \'e0\f0\cchs186 (jas nurod\f0\cchs186 \'eb\f0\cchs186 me aptardami model\f0\cchs186 \'e1\f0\cchs186 ). Tuomet, kai mo\-delio strukt\f0\cchs186 \'fb\f0\cchs186 riniai elementai funkcionuoja visuose ugdymo realyb\f0\cchs186 \'eb\f0\cchs186 s lygmeny\-se, jis apima daugel\f0\cchs186 \'e1\f0\cchs186 aplinkos veiksni\f0\cchs186 \'f8\f0\cchs186 , kurie yra gabumo virsmo pasiekimais katalizatoriai. Funkciniais ry\f0\cchs186 \'f0\f0\cchs186 iais susij\f0\cchs186 \'e6\f0\cchs186 elementai sukuria palaikan\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'e0\f0\cchs186 aplink\f0\cchs186 \'e0 \f0\cchs186 vienas kito veikimui, o tai savo ruo\f0\cchs186 \'fe\f0\cchs186 tu suma\f0\cchs186 \'fe\f0\cchs186 ina atsitiktinum\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 tiesiogi\-\cs44 niam \cs49 ugdymui, t.y. skatina gabaus vaiko saviugd\f0\cchs186 \'e0\f0\cchs186 .\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelio artimiausioji funkcionavimo aplinka yra \f0\cchs186 \'f0\f0\cchs186 vietimo sistema.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis yra atviras ir dinami\f0\cchs186 \'f0\f0\cchs186 kas. Atviras, nes tai yra socialin\f0\cchs186 \'eb\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 ra, kuriai \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 daro aplinka (netgi jo veikimo realyb\f0\cchs186 \'eb\f0\cchs186 je prasme). Modelio struk\-t\f0\cchs186 \'fb\f0\cchs186 riniai elementai turi daug vidini\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , o jie savo ruo\f0\cchs186 \'fe\f0\cchs186 tu yra atviri aplinkai, kitoms, i\f0\cchs186 \'f0\f0\cchs186 orin\f0\cchs186 \'eb\f0\cchs186 ms socialin\f0\cchs186 \'eb\f0\cchs186 ms strukt\f0\cchs186 \'fb\f0\cchs186 roms, sistemoms, yra dinami\f0\cchs186 \'f0\f0\cchs186 ki, nes i\f0\cchs186 \'f0\f0\cchs186 likti stati\f0\cchs186 \'f0\f0\cchs186 kam, kai kinta aplinka, n\f0\cchs186 \'eb\f0\cchs186 ra \f0\cchs186 \'e1\f0\cchs186 manoma. Dinami\f0\cchs186 \'f0\f0\cchs186 kas jis ir d\f0\cchs186 \'eb\f0\cchs186 l k\f0\cchs186 \'ab\'a9\f0\cchs186 $}\par \pard \plain \s11\qj\li0\fi0\ri0{\sl-240\slmult0\fs20\par }{\sl-240\slmult0\fs20\par }\sb121\sa0\sl-263\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Intrapersona-linis\chftn{\footnote\pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \chftn Pastaba. Interpersonalinio ir intrapersonalinio \cs48\b\fs20 lygmens \cs55\b0\fs22 elemcr\cs48\b\f0\cchs186\fs20 \'a3\f0\cchs186 E\cs52\b0\expndtw-20\fs30 ^^PK\cs48\b\expndtw0\fs20 ^niaj\par \pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 modelio elementai, kuri\f0\cchs186 \'f8\f0\cchs186 optimaliam veikimui \cs49 ir skirtas ug\strike dy\strike0 m\strike o\strike0 \cs55 s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 mo\-\cs55\fs22 delis\par \pard \plain \s23 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Sukurtasis \expndtw0 GAVUS\expndtw-20 modelis turi savo strukt\f0\cchs186 \'fb\f0\cchs186 r\f0\cchs186 \'e0\f0\cchs186 , funkcijas \cs53\expndtw-10 ir \cs63\expndtw0 funkcionavimo\expndtw-20 \expndtw0 aptin-\cs53\expndtw-10 k\f0\cchs186 \'e0\f0\cchs186 . \cs63\expndtw-20 Modelis turi \expndtw0 paskirti\expndtw-20 bendr\f0\cchs186 \'e0\f0\cchs186 tiksl\f0\cchs186 \'e0\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \cs49\i0\expndtw0 sudaryti s\f0\cchs186 \'e0\f0\cchs186 lygas gabiems valkams, nepriklausomai nuo j\f0\cchs186 \'f8\f0\cchs186 socialin\f0\cchs186 \'eb\f0\cchs186 s pad\f0\cchs186 \'eb\f0\cchs186 ties, gyvenamosios vietos, am\-\f0\cchs186 \'fe\f0\cchs186 iaus, lyties ir kt., rinktis j\f0\cchs186 \'f8\f0\cchs186 poreikius atitinkanti ugdym\f0\cchs186 \'e0\f0\cchs186 ir galimybes saviugdai, pad\f0\cchs186 \'eb\f0\cchs186 ti jam ir skatinti vaik\f0\cchs186 \'e0\f0\cchs186 siekti pilno savojo gabum\f0\cchs186 \'f8\f0\cchs186 po\-tencialo realizavimo ir b\f0\cchs186 \'fb\f0\cchs186 ti naudingam visuomenei, Sis tikslas suteikia modeliui vienov\f0\cchs186 \'eb\f0\cchs186 s, vientisumo.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Kiekvienas strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas turi ir papildom\f0\cchs186 \'f8\f0\cchs186 (i\f0\cchs186 \'f0\f0\cchs186 vestini\f0\cchs186 \'f8\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 ben\-drojo) tiksl\f0\cchs186 \'f8\f0\cchs186 , kurie susij\f0\cchs186 \'e6\f0\cchs186 su funkcijomis, kurias atlieka strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas. Modelis skirtas \f0\cchs186 \'fe\f0\cchs186 mogui, jame vyksta informacijos perdavimo ir valdymo pro\-cesai \f0\cchs186 \'97\f0\cchs186 tai b\f0\cchs186 \'fb\f0\cchs186 dinga visuomenin\f0\cchs186 \'eb\f0\cchs186 ms sistemoms.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis sudarytas i\f0\cchs186 \'f0\f0\cchs186 posistemi\f0\cchs186 \'f8\f0\cchs186 (pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, GVU atskiroje ugdymo institucijoje, jo posistem\f0\cchs186 \'eb\f0\cchs186 - pedagogin\f0\cchs186 \'eb\f0\cchs186 sistema, ir kt.). Visi GAVUS elementai yra vienaip ar kitaip susij\f0\cchs186 \'e6\f0\cchs186 su ugdymu ir jo funkcijomis: \f0\cchs186 \'f0\f0\cchs186 vietimu, lavinimu, aukl\f0\cchs186 \'eb\f0\cchs186 jimu, mokymu, globojimu, formavimu ir kt. Kiekviena jo sud\f0\cchs186 \'eb\f0\cchs186 tin\f0\cchs186 \'eb\f0\cchs186 dalis atlieka tam tikr\f0\cchs186 \'e0\f0\cchs186 funkcij\f0\cchs186 \'e0\f0\cchs186 (jas nurod\f0\cchs186 \'eb\f0\cchs186 me aptardami model\f0\cchs186 \'e1\f0\cchs186 ). Tuomet, kai mo\-delio strukt\f0\cchs186 \'fb\f0\cchs186 riniai elementai funkcionuoja visuose ugdymo realyb\f0\cchs186 \'eb\f0\cchs186 s lygmeny\-se, jis apima daugel\f0\cchs186 \'e1\f0\cchs186 aplinkos veiksni\f0\cchs186 \'f8\f0\cchs186 , kurie yra gabumo virsmo pasiekimais katalizatoriai. Funkciniais ry\f0\cchs186 \'f0\f0\cchs186 iais susij\f0\cchs186 \'e6\f0\cchs186 elementai sukuria palaikan\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'e0\f0\cchs186 aplink\f0\cchs186 \'e0 \f0\cchs186 vienas kito veikimui, o tai savo ruo\f0\cchs186 \'fe\f0\cchs186 tu suma\f0\cchs186 \'fe\f0\cchs186 ina atsitiktinum\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 tiesiogi\-\cs44 niam \cs49 ugdymui, t.y. skatina gabaus vaiko saviugd\f0\cchs186 \'e0\f0\cchs186 .\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelio artimiausioji funkcionavimo aplinka yra \f0\cchs186 \'f0\f0\cchs186 vietimo sistema.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis yra atviras ir dinami\f0\cchs186 \'f0\f0\cchs186 kas. Atviras, nes tai yra socialin\f0\cchs186 \'eb\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 ra, kuriai \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 daro aplinka (netgi jo veikimo realyb\f0\cchs186 \'eb\f0\cchs186 je prasme). Modelio struk\-t\f0\cchs186 \'fb\f0\cchs186 riniai elementai turi daug vidini\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , o jie savo ruo\f0\cchs186 \'fe\f0\cchs186 tu yra atviri aplinkai, kitoms, i\f0\cchs186 \'f0\f0\cchs186 orin\f0\cchs186 \'eb\f0\cchs186 ms socialin\f0\cchs186 \'eb\f0\cchs186 ms strukt\f0\cchs186 \'fb\f0\cchs186 roms, sistemoms, yra dinami\f0\cchs186 \'f0\f0\cchs186 ki, nes i\f0\cchs186 \'f0\f0\cchs186 likti stati\f0\cchs186 \'f0\f0\cchs186 kam, kai kinta aplinka, n\f0\cchs186 \'eb\f0\cchs186 ra \f0\cchs186 \'e1\f0\cchs186 manoma. Dinami\f0\cchs186 \'f0\f0\cchs186 kas jis ir d\f0\cchs186 \'eb\f0\cchs186 l k\f0\cchs186 \'ab\'a9\f0\cchs186 $}\par \sect\sectd \sbknone\pgwsxn20126\pghsxn13892\marglsxn733\margrsxn360\margtsxn360\margbsxn360\cols1\colsx60 {\header }{\footer \pard \plain \s27\qr\li0\fi0\ri0\sb0\sa0 \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 123}}\par }{\pard\plain \sb1144\sa0\sl-240\slmult0\fs20\par}\pard \plain \s29\qj\li11181\fi0\ri0\sb51\sa102 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4. \cs55 Gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ufidymo ir jo s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 mo\ul delio rai\f0\cchs186 \'f0\f0\cchs186 kos\ul0 \cs45\b\expndtw-10\f0\cchs186 \'c1\f0\cchs186 \cs55\b0\ul\expndtw0 jetuvo\f0\cchs186 \'e1\f0\cchs186 e \cs60\fs20 pristatymas\par \sect\sectd \sbknone\pgwsxn20126\pghsxn13892\marglsxn733\margrsxn453\margtsxn360\margbsxn360\cols2\colno1\colw8123\colsr2431\colno2\colw8385 {\shpgrp{\*\shpinst \shpleft10622\shptop263\shpright18737\shpbottom1966\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz7\shplid7{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 107315}}{\sp{\sn dyWrapDistBottom}{\sv 48260}}{\sp{\sn groupLeft}{\sv 12045}}{\sp{\sn groupTop}{\sv 2846}}{\sp{\sn groupRight}{\sv 20160}}{\sp{\sn groupBottom}{\sv 4549}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 12045}}{\sp{\sn relTop}{\sv 2922}}{\sp{\sn relRight}{\sv 20160}}{\sp{\sn relBottom}{\sv 4100}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Nr.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0\sl-144\slmult0\tlhyph\tx3744\tlul\tx4574 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn2\f0\cchs186\lang1063\langfe1063\fs22 rr-ri{\charscalex100\expndtw0\tab }\cs61\fs12 _ {\charscalex100\expndtw0\tab } J \f0\cchs186 \'bb\par \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Teiginys \f0\cchs186 \'97\cell \pard \plain \s35\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 mreies\par \pard \plain \s3\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Vid *\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 t\f0\cchs186 \'e6\f0\cchs186 sinys\par \pard \plain \s24\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 Qt \cs60\fs20 n\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 11.\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Tr\f0\cchs186 \'fb\f0\cchs186 ksta mokini\f0\cchs186 \'f8\f0\cchs186 t\f0\cchs186 \'eb\f0\cchs186 v\f0\cchs186 \'f8\f0\cchs186 palaikymo, pritarimo\cell \pard \plain \s5\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 00\cs49\fs22 .24\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.21\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 12.\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 [Tr\f0\cchs186 \'fb\f0\cchs186 ksta mokyklos administracijos paskatinimo ir \cs57\expndtw10\fs16 nri\cs58\expndtw0\fs20 -^mn\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\tlhyph\tx5472\tlhyph\tx6107 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 maksimalus \cs60\b0 galimas trukume .v\cs57\b\expndtw10\fs16 .-rr.\cs59\i\expndtw-10\f9\cchs186\fs22 ^-ETrr\cs60\b0\i0\expndtw0\f0\cchs186\fs20 {\charscalex100\expndtw0\tab }rr{\charscalex100\expndtw0\tab }1\cell \pard \plain \s5\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 00\cs49\fs22 .41\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.22\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 18025}}{\sp{\sn relTop}{\sv 2846}}{\sp{\sn relRight}{\sv 20152}}{\sp{\sn relBottom}{\sv 3117}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\ql\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4.2.3 lentel\f0\cchs186 \'eb\f0\cchs186 s t\f0\cchs186 \'e6\f0\cchs186 sinys\par }}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 12629}}{\sp{\sn relTop}{\sv 4074}}{\sp{\sn relRight}{\sv 20100}}{\sp{\sn relBottom}{\sv 4549}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s22\ql\li0\fi2821\ri0\sb0\sa0\sl-161\slmult0\tlhyph\tx3456\tldot\tx3812 \cs62\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs18 _ ,{\charscalex100\expndtw0\tab }{\charscalex100\expndtw0\tab }.\f0\cchs186 \'84\'ab\f0\cchs186 , , icigu \expndtw20 trukumo\expndtw0 \cs55\fs22 visi\f0\cchs186 \'f0\f0\cchs186 kai nejau\f0\cchs186 -\line \'e8\f0\cchs186 iama \f0\cchs186 \'97\f0\cchs186 vertinimas \cs49\f0\cchs186 \'84\f0\cchs186 -2".\par }}}}}{\shpgrp{\*\shpinst \shpleft-373\shptop6683\shpright8098\shpbottom12511\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr2\shpwrk3\shpz8\shplid8{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn groupLeft}{\sv 1050}}{\sp{\sn groupTop}{\sv 9267}}{\sp{\sn groupRight}{\sv 9521}}{\sp{\sn groupBottom}{\sv 15095}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 1050}}{\sp{\sn relTop}{\sv 10275}}{\sp{\sn relRight}{\sv 9521}}{\sp{\sn relBottom}{\sv 15095}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li246\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Nr\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Teiginys\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Vid.*\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 St. n.\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1 \super 1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta u\f0\cchs186 \'fe\f0\cchs186 mokes\f0\cchs186 \'e8\f0\cchs186 io u\f0\cchs186 \'fe\f0\cchs186 \cs56\fs18 papildom\f0\cchs186 \'e0\f0\cchs186 \cs55\fs22 darb\f0\cchs186 \'e0\f0\cchs186 ,.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.43\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.84\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 12.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta materialinio paskatinimo itin gabiems mokiniams.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.35\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.87\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 13.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta bendros itin gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo politikos visos i\f0\cchs186 \'f0\f0\cchs186 liet \cs52\expndtw-20\fs30 j \cs44\expndtw0\fs22 mastu.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.27\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.85\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 14.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 [Tr\f0\cchs186 \'fb\f0\cchs186 ksta apr\f0\cchs186 \'fb\f0\cchs186 pinimo reikalinga mokymo metodine med\f0\cchs186 \'fe\f0\cchs186 iaga\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.22\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.96\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 15.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta kvalifikacijos k\f0\cchs186 \'eb\f0\cchs186 limo kurs\f0\cchs186 \'f8\f0\cchs186 itin gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo \cs44 tems.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .20\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.91\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0\sl-407\slmult0 \intbl \cs52\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw-20\up2\f0\cchs186\lang1063\langfe1063\fs30 j \cs44\expndtw0\fs22 6. \cs55 j\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-313\slmult0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta \cs55 bendradarbiavimo tu auk\f0\cchs186 \'f0\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 mokykl\f0\cchs186 \'f8\f0\cchs186 d\f0\cchs186 \'eb\f0\cchs186 stytojais, \cs44 mokalininkaif.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .04\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.99\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-313\slmult0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 7. \cs55 1 \cs44 Tr\f0\cchs186 \'fb\f0\cchs186 ksta literatu \expndtw-20 rot\expndtw0 \cs54\i\expndtw-20 apie itin \cs55\i0\expndtw0 gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 pa\f0\cchs186 \'fe\f0\cchs186 inim\f0\cchs186 \'e0\f0\cchs186 , ugdym\f0\cchs186 \'e0\f0\cchs186 , \cs52\expndtw-20\fs30 j \cs55\expndtw0\fs22 psichologij\f0\cchs186 \'e0\f0\cchs186 , \cs44 kir\f0\cchs186 \'f8\f0\cchs186 \cs55\f0\cchs186 \'f0\f0\cchs186 ali\f0\cchs186 \'f8\f0\cchs186 patirt j.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .00\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.97\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 8. \cs55 j Tr\f0\cchs186 \'fb\f0\cchs186 ksta \cs44 bendradarbiavimo \cs55 su patyrusiais \f0\cchs186 \'f0\f0\cchs186 ioje srityje kolegomis,\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.88\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.02\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s32\ql\li0\fi0\ri0\sb0\sa0\sl-356\slmult0 \intbl \cs52\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw-20\dn4\f0\cchs186\lang1063\langfe1063\fs30 1 \cs49\expndtw0\fs22 1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 'r\f0\cchs186 \'fb\f0\cchs186 ksta \cs44 tinkamo \cs55 pasirengimo auk\f0\cchs186 \'f0\f0\cchs186 tojoje mokykloje.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.56\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.17\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 10. 7\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 r\f0\cchs186 \'fb\f0\cchs186 ksta galimybi\f0\cchs186 \'f8\f0\cchs186 \cs44 naudotis \cs55 kompiuteriu ir internetu.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 -0.19\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.33\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 2151}}{\sp{\sn relTop}{\sv 9267}}{\sp{\sn relRight}{\sv 8724}}{\sp{\sn relBottom}{\sv 10300}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s2\qj\li0\fi0\ri0\sb0\sa0\sl-330\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Duomenys apie tai, ko mokytojams tr\f0\cchs186 \'fb\f0\cchs186 ksta darbui su itin\par \pard \plain \s20\ql\li0\fi2406\ri0\sb0\sa0\sl-330\slmult0\tlul\tx805 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 gabiais vaikais\line \lang1033 {\charscalex100\expndtw0\tab }\ul\lang1063 (Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , Janilionis,\ul0 Almonaitien\f0\cchs186 \'eb\f0\cchs186 , \cs49 2002)\par }}}}}\pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-322\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 niams, galima manyti, kad jaunesni\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 klasi\f0\cchs186 \'f8\f0\cchs186 gabi\f0\cchs186 \'f8\f0\cchs186 mokini\f0\cchs186 \'f8\f0\cchs186 ugdymo rezulta\-tai \f0\cchs186 \'fe\f0\cchs186 inomi ir fiksuojami tik klases ir mokyklos (atskirais atvejais savivaldyb\f0\cchs186 \'eb\f0\cchs186 s) lygmeniu. be to, olimpiad\f0\cchs186 \'f8\f0\cchs186 rezultatai - tai tik pasiekimai, \cs49 o \cs55 kas daroma klas\f0\cchs186 \'eb\-\f0\cchs186 je, \cs53\i\expndtw-10 mokykloje, \cs55\i0\expndtw0 kad tie pasiekimai b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 tokie, ir \cs49 ar \cs55 tie pasiekimai \f0\cchs186 \'97\f0\cchs186 tai mokytojo ir mokinio darbo rezultatas ar tik mokinio potencialo \{vertinimas, informaci\-jos taip pat neturime arba turime labai nedaug \cs49 (\f0\cchs186 \'fe\f0\cchs186 r. \cs55 Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , \cs49 1997,1998, \cs55 2003, Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , Janilionis, Almonaitien\f0\cchs186 \'eb\f0\cchs186 , \cs49 2002).\par \pard \plain \s2\qj\li0\fi576\ri0\sb0\sa0\sl-322\slmult0 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Mokytoj\f0\cchs186 \'f8\f0\cchs186 rengimas. \cs55\i0\expndtw0 N\f0\cchs186 \'eb\f0\cchs186 vienas Lietuvos universitetas, rengiantis mokyto\-jus, nesi\f0\cchs186 \'fb\f0\cchs186 lo pirmos ar antros pakopos studij\f0\cchs186 \'f8\f0\cchs186 programos, kurios paskirtis b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8 \f0\cchs186 ai\f0\cchs186 \'f0\f0\cchs186 kiai orientuota \f0\cchs186 \'e1\f0\cchs186 gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo specialisto parengim\f0\cchs186 \'e0\f0\cchs186 . Per\f0\cchs186 \'fe\f0\cchs186 i\f0\cchs186 \'fb\f0\cchs186 r\f0\cchs186 \'eb\f0\cchs186 jus mokytoj\f0\cchs186 \'f8\f0\cchs186 rengimo programas Vilniaus pedagoginiame, \f0\cchs186 \'d0\f0\cchs186 iauli\f0\cchs186 \'f8\f0\cchs186 , Kauno tech\-nologijos bei Vytauto Did\f0\cchs186 \'fe\f0\cchs186 iojo universitetuose, rasti tik du, be to, tik \cs63\i\expndtw-20 pasiren\-kamieji \cs55\i0\expndtw0 gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 problemoms skirti moduliai. Tai Vilniaus pedagoginiame universitete neakivaizdininkams \cs63\i\expndtw-20 si\f0\cchs186 \'fb\f0\cchs186 lomas \cs55\i0\expndtw0 modulis \f0\cchs186 \'84\f0\cchs186 Gabi\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 atpa\f0\cchs186 \'fe\f0\cchs186 inimas ir ugdymo galimyb\f0\cchs186 \'eb\f0\cchs186 s" bei \f0\cchs186 \'d0\f0\cchs186 iauli\f0\cchs186 \'f8\f0\cchs186 pedagoginiame universitete si\f0\cchs186 \'fb\f0\cchs186 lomas modulis \f0\cchs186 \'84\f0\cchs186 Gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 psichologija".\par \pard \plain \s23\qj\li0\fi576\ri0\sb8\sa0\sl-322\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Lietuvos mokytojams, \cs49 tyrim\f0\cchs186 \'f8\f0\cchs186 duomenimis (Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , \cs55 Janilionis, \cs49 Almonaitien\f0\cchs186 \'eb\f0\cchs186 , \cs55 2002), darbui su \cs49 gabiais vaikais tr\f0\cchs186 \'fb\f0\cchs186 ksta \cs55 ir tinkamo pasirengimo auk\f0\cchs186 \'f0\f0\cchs186 tojoje \cs49 mokykloje, ir kir\f0\cchs186 \'f8\f0\cchs186 \cs55 dalyk\f0\cchs186 \'f8\f0\cchs186 \cs49 (\f0\cchs186 \'fe\f0\cchs186 r. 4.2.3 lentel\f0\cchs186 \'e6\f0\cchs186 ).\par \pard \plain \s11\qr\li0\fi0\ri0{\sl-240\slmult0\fs20\p`r }\sb65\sa0 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4.2.3 \cs55 lentel\f0\cchs186 \'eb\par \pard \plain \s29\ql\li0\fi568\ri0\sb0\sa0\sl-322\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Lentel\f0\cchs186 \'eb\f0\cchs186 je teiginiai pateikti eil\f0\cchs186 \'eb\f0\cchs186 s tvarka pagal tr\f0\cchs186 \'fb\f0\cchs186 kumo \f0\cchs186 \'e1\f0\cchs186 vertinimo vidur\-k\f0\cchs186 \'e1\f0\cchs186 . Matome, jog labiausiai, mokytoj\f0\cchs186 \'f8\f0\cchs186 nuomone, tr\f0\cchs186 \'fb\f0\cchs186 ksta u\f0\cchs186 \'fe\f0\cchs186 mokes\f0\cchs186 \'e8\f0\cchs186 io u\f0\cchs186 \'fe\f0\cchs186 papil\-dom\f0\cchs186 \'e0\f0\cchs186 darb\f0\cchs186 \'e0\f0\cchs186 , materialinio paskatinimo gabiems vaikams ir bendros gabi\f0\cchs186 \'f8\f0\cchs186 vai\-k\f0\cchs186 \'f8\f0\cchs186 ugdymo politikos visos \f0\cchs186 \'f0\f0\cchs186 alies mastu. Su pirmu teiginiu visi\f0\cchs186 \'f0\f0\cchs186 kai sutiko \cs49 59%, \cs55 sutiko \cs49 30% \cs55 (t.y. i\f0\cchs186 \'f0\f0\cchs186 viso taip teig\f0\cchs186 \'eb\f0\cchs186 \cs49 89%) \cs55 mokytoj\f0\cchs186 \'f8\f0\cchs186 , dar \cs49 7% \cs55 renkasi neutrali\f0\cchs186 \'e0 \f0\cchs186 pozicij\f0\cchs186 \'e0\f0\cchs186 . \cs49 88% \cs55 mokytoj\f0\cchs186 \'f8\f0\cchs186 mano, jog tr\f0\cchs186 \'fb\f0\cchs186 ksta materialinio paskatinimo patiems gabiems mokiniams. \cs49 87% \cs55 respondent\f0\cchs186 \'f8\f0\cchs186 mano, kad tr\f0\cchs186 \'fb\f0\cchs186 ksta bendros itin gabi\f0\cchs186 \'f8 \f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo politikos \f0\cchs186 \'d0\f0\cchs186 alies mastu; \cs49 84% \cs55 - apr\f0\cchs186 \'fb\f0\cchs186 pinimo mokymo metodi\-ne med\f0\cchs186 \'fe\f0\cchs186 iaga; \cs49 86% \cs55 - kvalifikacijos k\f0\cchs186 \'eb\f0\cchs186 limo kurs\f0\cchs186 \'f8\f0\cchs186 , \cs49 79% \cs55 - bendradarbiavimo su mokslininkais; \cs49 76% \cs55 - atitinkamos literat\f0\cchs186 \'fb\f0\cchs186 ras; \cs49 74% \cs55 - bendradarbiavimo su patyrusiais \f0\cchs186 \'f0\f0\cchs186 ioje srityje kolegomis (neutralus vertinimas - \cs49 14%). \cs55 Tinkamo pasirengimo auk\f0\cchs186 \'f0\f0\cchs186 tojoje mokykloje pasigedo \cs49 60% \cs55 apklaust\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 mokytoj\f0\cchs186 \'f8\f0\cchs186 , tik penktadalis \cs49 (21%) \cs55 j\f0\cchs186 \'f8\f0\cchs186 sutiko, jog auk\f0\cchs186 \'f0\f0\cchs186 toji mokykla pareng\f0\cchs186 \'eb\f0\cchs186 j\f0\cchs186 \'e1\f0\cchs186 /j\f0\cchs186 \'e0\f0\cchs186 \f0\cchs186 \'f0\f0\cchs186 iam darbui. Malonu pasteb\f0\cchs186 \'eb\f0\cchs186 ti, jog \cs49 56% \cs55 mokytoj\f0\cchs186 \'f8\f0\cchs186 darbui su itin gabiais vaikais \expndtw-20 yra\expndtw0 skatina\-mi ir palaikomi mokyklos administracijos (neutralum\f0\cchs186 \'e0\f0\cchs186 vertinant teigin\f0\cchs186 \'e1\f0\cchs186 rinko\-si \cs49 18%). \cs55 Nema\f0\cchs186 \'fe\f0\cchs186 ai mokytoj\f0\cchs186 \'f8\f0\cchs186 turi galimybi\f0\cchs186 \'f8\f0\cchs186 naudotis kompiuteriu ir internetu \cs49 (49% \cs55 nejau\f0\cchs186 \'e8\f0\cchs186 ia tr\f0\cchs186 \'fb\f0\cchs186 kumo, \cs49 16% \cs55 lieka neutral\f0\cchs186 \'fb\f0\cchs186 s, \cs49 35% \cs55 tr\f0\cchs186 \'fb\f0\cchs186 ksta tokios galimybes). \cs49 46% \cs55 mokytoj\f0\cchs186 \'f8\f0\cchs186 jau\f0\cchs186 \'e8\f0\cchs186 ia t\f0\cchs186 \'eb\f0\cchs186 v\f0\cchs186 \'f8\f0\cchs186 palaikym\f0\cchs186 \'e0\f0\cchs186 , \cs49 31% \cs55 tokio palaikymo pasigenda.\par \pard \plain \s17\ql\li0\fi0\ri0\sb0\sa0\sl-322\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Anketoje buvo palikta vieta laisvam atsakymui, ko \cs64\b\expndtw-20\fs26 dar tr\f0\cchs186 \'fb\f0\cchs186 ksta, \cs55\b0\expndtw0\f0\cchs186\fs22 \'e1\f0\cchs186 ra\f0\cchs186 \'f0\f0\cchs186 yti. Pa\-min\f0\cchs186 \'eb\f0\cchs186 tini tokie dalykai, kuri\f0\cchs186 \'f8\f0\cchs186 mokytojai nurod\f0\cchs186 \'eb\f0\cchs186 pasigendantys (kalba netaisyta): \cs63\i\expndtw-20 d\f0\cchs186 \'eb\f0\cchs186 mesio, sistemos Siame darbe; \f0\cchs186 \'e1\f0\cchs186 d\f0\cchs186 \'eb\f0\cchs186 jimu \f0\cchs186 \'e1\f0\cchs186 J\f0\cchs186 \'e1\f0\cchs186 darini plali\f0\cchs186 \'e0\f0\cchs186 ja prasme; pa$d laikmet\f0\cchs186 \'e1 \f0\cchs186 apr\f0\cchs186 \'fb\f0\cchs186 pinto kabineto; lenko; &bi\f0\cchs186 \'f8\f0\cchs186 mokini\f0\cchs186 \'f8\f0\cchs186 su ffra mokymosi motyvacija; skiriam\f0\cchs186 \'e0 \f0\cchs186 papildomai pamoki\f0\cchs186 \'e1\f0\cchs186 mokytojai - olimpiadoms ruo\f0\cchs186 \'f0\f0\cchs186 tis; materialin\f0\cchs186 \'eb\f0\cchs186 s bas\f0\cchs186 \'e6\f0\cchs186 s, ma&u* mokint\f0\cchs186 \'e0\f0\cchs186 skaiiiaus klas\f0\cchs186 \'eb\f0\cchs186 je, nes bana labai sunku diferencijuotai dirbti, meni nesp\f0\cchs186 \'eb\f0\cchs186 ja, kiti neturi k\f0\cchs186 \'e0\f0\cchs186 neikti, vadov\f0\cchs186 \'eb\f0\cchs186 liuose dainai n\f0\cchs186 \'eb\f0\cchs186 ra tinkam\f0\cchs186 \'e0\f0\cchs186 nf\f0\cchs186 \'eb\f0\cchs186 eoti\f0\cchs186 \'e0\f0\cchs186 ; dau\f0\cchs186 \'fe\f0\cchs186 tu stovykl\f0\cchs186 \'f8 \sub\f0\cchs186 ga\nosupersub /,iems tankiniam respublikos mastu, bet kad \f0\cchs186 \'e1\f0\cchs186 jos patekt\f0\cchs186 \'f8\f0\cchs186 irprmncijos vaikai, \expndtw0 o\expndtw-20 \expndtw0 neHk\expndtw-20 didf\f0\cchs186 \'e1\f0\cchs186 nj\f0\cchs186 \'f8\f0\cchs186 miest\f0\cchs186 \'f8\f0\cchs186 ; mokini\f0\cchs186 \'f8\f0\cchs186 suinterrsmtama mokytis; laiko per pamokas m po pamnk\f0\cchs186 \'e0\f0\cchs186 ; bijau perkrauti mokinis nereikt\f0\cchs186 \'f8\f0\cchs186 niveliuoti \f0\cchs186 \'e1\f0\cchs186 tatna\f0\cchs186 \'f8\f0\cchs186 j/\f0\cchs186 \'f8\f0\cchs186 \expndtw0 irj\f0\cchs186 \'f8\expndtw-20\f0\cchs186 sukart\f0\cchs186 \'f8 \f0\cchs186 proffttm\f0\cchs186 \'f8\f0\cchs186 .\par \pard \plain \s34\qc\li0\fi0\ri0\sb102\sa0 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Apilmidrinamosios i\f0\cchs186 \'f0\f0\cchs186 vados\par \pard \plain \s29\ql\li584\fi0\ri0\sb110\sa0 \cs64\i0\strike0\nosupersub\b\scaps0\charscalexó š100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs26 Tiriant GAVUS \cs55\b0\expndtw0\fs22 modelio rai\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'e0\f0\cchs186 visuomeniniame lygmenyje, i\f0\cchs186 \'f0\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'eb\f0\cchs186 jo\par \pard \pla in \s11\ql\li0\fi4294967295\ri0\sb102\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 tokios problemos:\par } \ No newline at end of file
+{\rtf1\`nsi \ansicpg1252\stshfloch0{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green102\blue204;\red102\green99\blue0;\red143\green142\blue142;\red75\green60\blue52;}{\fonttbl{\f0\froman\cpg1257\fcharset186 DejaVu Serif;}{\f1\froman\cpg0\fcharset0 DejaVu Serif;}{\f2\froman\cpg1252\fcharset0 DejaVu Serif;}{\f3\fswiss\cpg1257\fcharset186 DejaVu Sans;}{\f4\fswiss\cpg0\fcharset0 DejaVu Sans;}{\f5\fswiss\cpg1252\fcharset0 DejaVu Sans;}{\f6\froman\cpg1257\fcharset186 Times New Roman;}{\f7\froman\cpg0\fcharset0 Times New Roman;}{\f8\froman\cpg1252\fcharset0 Times New Roman;}{\f9\fmodern\cpg1257\fcharset186 Courier New;}{\f10\fmodern\cpg0\fcharset0 Courier New;}{\f11\fmodern\cpg1252\fcharset0 Courier New;}}{\stylesheet {\ql Normal;}{\s1\sbasedon0\ql\fi-120\sl-276\slmult0 Style1;}{\s2\sbasedon0\qj\fi560\sl-300\slmult0 Style2;}{\s3\sbasedon0\ql\sl-264\slmult0 Style3;}{\s4\sbasedon0\ql\fi-1088\sl-320\slmult0 Style4;}{\s5\sbasedon0\ql Style5;}{\s6\sbasedon0\ql Style6;}{\s7\sbasedon0\ql\sl-320\slmult0 Style7;}{\s8\sbasedon0\qr Style8;}{\s9\sbasedon0\ql Style9;}{\s10\sbasedon0\qj\sl-264\slmult0 Style10;}{\s11\sbasedon0\qj\sl-298\slmult0 Style11;}{\s12\sbasedon0\qj\sl-288\slmult0 Style12;}{\s13\sbasedon0\ql Style13;}{\s14\sbasedon0\ql\fi600\sl-329\slmult0 Style14;}{\s15\sbasedon0\ql\sl-240\slmult0 Style15;}{\s16\sbasedon0\ql Style16;}{\s17\sbasedon0\ql\fi576\sl-328\slmult0 Style17;}{\s18\sbasedon0\ql Style18;}{\s19\sbasedon0\ql\sl-271\slmult0 Style19;}{\s20\sbasedon0\ql\fi2406\sl-339\slmult0 Style20;}{\s21\sbasedon0\ql Style21;}{\s22\sbasedon0\ql\fi2821\sl-161\slmult0 Style22;}{\s23\sbasedon0\ql\fi568\sl-306\slmult0 Style23;}{\s24\sbasedon0\ql Style24;}{\s25\sbasedon0\ql Style25;}{\s26\sbasedon0\ql Style26;}{\s27\sbasedon0\ql Style27;}{\s28\sbasedon0\qj\sl-271\slmult0 Style28;}{\s29\sbasedon0\ql\fi568\sl-322\slmult0 Style29;}{\s30\sbasedon0\ql Style30;}{\s31\sbasedon0\ql Style31;}{\s32\sbasedon0\ql Style32;}{\s33\sbasedon0\ql Style33;}{\s34\sbasedon0\ql Style34;}{\s35\sbasedon0\ql Style35;}{\*\cs36\additive Default Paragraph Font;}{\*\cs37\sbasedon36\additive\b\charscalex120\f2\fs58 Font Style37;}{\*\cs38\sbasedon36\additive\b\charscalex30\f2\fs400 Font Style38;}{\*\cs39\sbasedon36\additive\i\f2\fs22 Font Style39;}{\*\cs40\sbasedon36\additive\scaps\f8\fs8 Font Style40;}{\*\cs41\sbasedon36\additive\i\b\f2\fs10 Font Style41;}{\*\cs42\sbasedon36\additive\f5\fs8 Font Style42;}{\*\cs43\sbasedon36\additive\b\expndtw200\f2\fs10 Font Style43;}{\*\cs44\sbasedon36\additive\f2\fs22 Font Style44;}{\*\cs45\sbasedon36\additive\b\expndtw-10\f2\fs22 Font Style45;}{\*\cs46\sbasedon36\additive\scaps\f2\fs20 Font Style46;}{\*\cs47\sbasedon36\additive\charscalex20\f2\fs104 Font Style47;}{\*\cs48\sbasedon36\additive\b\f2\fs20 Font Style48;}{\*\cs49\sbasedon36\additive\f2\fs22 Font Style49;}{\*\cs50\sbasedon36\additive\b\f2\fs38 Font Style50;}{\*\cs51\sbasedon36\additive\f2\fs20 Font Style51;}{\*\cs52\sbasedon36\additive\expndtw-20\f2\fs30 Font Style52;}{\*\cs53\sbasedon36\additive\i\expndtw-10\f2\fs22 Font Style53;}{\*\cs54\sbasedon36\additive\i\expndtw-20\f2\fs22 Font Style54;}{\*\cs55\sbasedon36\additive\f2\fs22 Font Style55;}{\*\cs56\sbasedon36\additive\f2\fs18 Font Style56;}{\*\cs57\sbasedon36\additive\b\expndtw10\f2\fs16 Font Style57;}{\*\cs58\sbasedon36\additive\b\f2\fs20 Font Style58;}{\*\cs59\sbasedon36\additive\i\b\expndtw-10\f11\fs22 Font Style59;}{\*\cs60\sbasedon36\additive\f2\fs20 Font Style60;}{\*\cs61\sbasedon36\additive\f2\fs12 Font Style61;}{\*\cs62\sbasedon36\additive\f2\fs18 Font Style62;}{\*\cs63\sbasedon36\additive\i\expndtw-20\f2\fs22 Font Style63;}{\*\cs64\sbasedon36\additive\b\expndtw-20\f2\fs26 Font Style64;}}\fet2{\*\ftnsep {\chftnsep\par }}{\*\aftnsep {\chftnsep\par }}\expshrtn\widowctrl\paperw20384\paperh12312\margl360\margr360\margt360\margb360 \sectd \sbknone\pgwsxn20384\pghsxn12312\marglsxn360\margrsxn360\margtsxn360\margbsxn360\titlepg\cols2\colno1\colw8632\colsr2104\colno2\colw8928 {\headerf }{\footerf }{\header \pard \plain \s11\ql\li720\fi0\ri9\sb0\sa0\tx2120 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \'e1\f0\cchs186 Ma\ul b\f0\cchs186 \'fb\f0\cchs186 s vaikai:\ul0 {\charscalex100\expndtw0\tab }\ul ir galimyb\f0\cchs186 \'eb\f0\cchs186 s\par }{\footer \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx0\posnegy0\absw0\absh-254\nowrap\dfrmtxtx34\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 100}}\par \pard \plain \s21\qr\li720\fi0\ri9{\sl-240\slmult0\fs20\par }\sb90\sa0 \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 101\par }\pard\sl-4680\slmult0\sb0\keepn\pvpara\dropcapli7\dropcapt1{\b\i0\ul0\cf0\highlight0\charscalex30\f0\fs400{i}\par}\pard \plain \s1\ql\li880\fi-880\ri0\sb0\sa0\sl-272\slmult0 \cs37\i0\strike0\nosupersub\b\scaps0\charscalex120\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs58 Hfc \cs55\b0\super\charscalex100\fs22 mddj8\nosupersub \super tUn\nosupersub \super tam\nosupersub \super dkrts\nosupersub identifikacijos proced\f0\cchs186 \'fb\f0\cchs186 ras, vadinasi \cs60\fs20 ivuiiy* toje \cs55\fs22 programoje \cs53\i\expndtw-10 asmenys \cs55\i0\expndtw0 turi mok\f0\cchs186 \'eb\f0\cchs186 ti naudotis identifikacijos \f0\cchs186 \'e1\f0\cchs186 ran-\cs60\fs20 *>*\f0\cchs186 \'ab\'f8\f0\cchs186 geb\f0\cchs186 \'eb\f0\cchs186 ti \cs55\fs22 analizuoti mokini\f0\cchs186 \'f8\f0\cchs186 veiklos produktus ir pati mokymosi proces\f0\cchs186 \'e0\f0\cchs186 , \cs60\f0\cchs186\fs20 \'95\f0\cchs186 tpaftistant \cs55\fs22 kriterijus, pagal kuriuos vaikas gali b\f0\cchs186 \'fb\f0\cchs186 ti priskirtas gabi\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 grupei. \cs60\fs20 Vargu, ar \cs55\fs22 bc specialaus \cs53\i\expndtw-10 pasirengimo \cs55\i0\expndtw0 gali dirbti mokytojas. Pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, Clark modelyje numatyta, kad mokytojas turi b\f0\cchs186 \'fb\f0\cchs186 ti \f0\cchs186 \'e1\f0\cchs186 vald\f0\cchs186 \'e6\f0\cchs186 s \f0\cchs186 \'e1\f0\cchs186 tampos klas\f0\cchs186 \'eb\f0\cchs186 je suma\f0\cchs186 \'fe\f0\cchs186 i\-nimo strategijas (autogenin\f0\cchs186 \'e6\f0\cchs186 treniruot\f0\cchs186 \'e6\f0\cchs186 , meditacij\f0\cchs186 \'e0\f0\cchs186 ), turi geb\f0\cchs186 \'eb\f0\cchs186 ti parinkti mo\-kymo med\f0\cchs186 \'fe\f0\cchs186 iag\f0\cchs186 \'e0\f0\cchs186 , pratimus ir u\f0\cchs186 \'fe\f0\cchs186 duotis, kurioms atlikti b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 naudojama abiej\f0\cchs186 \'f8 \f0\cchs186 smegen\f0\cchs186 \'f8\f0\cchs186 pusrutuli\f0\cchs186 \'f8\f0\cchs186 veikla, geb\f0\cchs186 \'eb\f0\cchs186 ti \f0\cchs186 \'e1\f0\cchs186 ugdymo turin\f0\cchs186 \'e1\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 traukti pratimus, kurie, panaudojant fizin\f0\cchs186 \'e1\f0\cchs186 k\f0\cchs186 \'fb\f0\cchs186 n\f0\cchs186 \'e0\f0\cchs186 , abstraktaus ir simbolinio lygmens \cs39\i informacij\f0\cchs186 \'e0\f0\cchs186 , \cs55\i0 trans\-formuoja \f0\cchs186 \'e1\f0\cchs186 konkretesn\f0\cchs186 \'e1\f0\cchs186 lygmen\f0\cchs186 \'e1\f0\cchs186 ir pan. Kai kurie autoriai, pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, Wil-liams, netgi nurodo mokymo strategijas, kurias \cs39\i naudoti savo \cs55\i0 darbe turi mok\f0\cchs186 \'eb\f0\cchs186 ti \cs60\fs20 mokytojas, \cs55\fs22 kiti savo darbo komand\f0\cchs186 \'e0\f0\cchs186 apmoko. Renzulli modelio realizavimo komand\f0\cchs186 \'e0\f0\cchs186 sudaro ne tik mokytojai, bet ir t\f0\cchs186 \'eb\f0\cchs186 vai, bendruomen\f0\cchs186 \'eb\f0\cchs186 s ekspertai, mo\-kyklos administracija ir kt. personalas. Modelio veikimo efektyvum\f0\cchs186 \'e0\f0\cchs186 vertina \cs53\i\expndtw-10 visi \cs39\expndtw0 jo \cs53\expndtw-10 dalyviai, pagal tokios analiz\f0\cchs186 \'eb\f0\cchs186 s \cs55\i0\expndtw0 rezultatus bei mokini\f0\cchs186 \'f8\f0\cchs186 pageidavimus ar pakitusius poreikius ugdymo programa modifikuojama.\par \pard \plain \s2\ql\li576\fi560\ri0\sb0\sa0\sl-296\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Atskirai reik\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 pamin\f0\cchs186 \'eb\f0\cchs186 ti Taylor model\f0\cchs186 \'e1\f0\cchs186 . Jis vadinamas ir muititalento, ir k\f0\cchs186 \'fb\f0\cchs186 rybinio bei kritinio m\f0\cchs186 \'e0\f0\cchs186 stymo modeliu. \cs39\i Laikoma, kad \cs55\i0 bent vienai (j\f0\cchs186 \'f8\f0\cchs186 nuro\-domos net devynios) gabumo sri\f0\cchs186 \'e8\f0\cchs186 iai yra gabus kiekvienas vaikas. Toks gabi\f0\cchs186 \'f8 \f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 \cs53\i\expndtw-10 ugdymo modelis tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti \cs39\expndtw0 priimtinas ir \cs55\i0\f0\cchs186 \'fe\f0\cchs186 mon\f0\cchs186 \'eb\f0\cchs186 ms, kurie mano, jog visi vaikai \cs60\fs20 turi \cs55\fs22 tam \cs53\i\expndtw-10 tikr\f0\cchs186 \'f8\f0\cchs186 \cs55\i0\expndtw0 gabum\f0\cchs186 \'f8\f0\cchs186 , ir d\f0\cchs186 \'eb\f0\cchs186 l koki\f0\cchs186 \'f8\f0\cchs186 nors prie\f0\cchs186 \'fe\f0\cchs186 as\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 nenori pripa\-\cs60\f0\cchs186\fs20 \'fe\f0\cchs186 inti \cs55\fs22 gabum\f0\cchs186 \'f8\f0\cchs186 \cs53\i\expndtw-10 lygmens \cs55\i0\expndtw0 skirtum\f0\cchs186 \'f8\f0\cchs186 . Modelio autorius nurodo \f0\cchs186 \'f0\f0\cchs186 ias gabum\f0\cchs186 \'f8\f0\cchs186 sritis: akademin\f0\cchs186 \'eb\f0\cchs186 s srities, \cs53\i\expndtw-10 produktyviojo \cs55\i0\expndtw0 m\f0\cchs186 \'e0\f0\cchs186 stymo, komuniJcavimo, prognozavimo, \cs53\i\expndtw-10 sprendim\f0\cchs186 \'f8\f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimo, plan\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 gyvendinimo, \cs55\i0\expndtw0\f0\cchs186 \'fe\f0\cchs186 mogi\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , galimybi\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\'fe\f0\cchs186 vel\-gimo \cs39\i\expndtw-20 (ir.\expndtw0 2.2.1 \cs53\expndtw-10 lentel\f0\cchs186 \'e6\f0\cchs186 ).\par \pard \plain \s11\qj\li6976\fi0\ri0{\sl-240\slmult0\fs20\par }\sb72\sa0 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 2.2.1 \cs55 lentel\f0\cchs186 \'eb\par \pard \plain \s8\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx6464\posnegy688\absw0\absh-256\dfrmtxtx40\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 U\f0\cchs186 \À§fe\f0\cchs186 duo\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 pavyzd\f0\cchs186 \'fe\f0\cchs186 iai\par \pard \plain \s4\qc\li2112\fi0\ri2232\sb0\sa0\sl-320\slmult0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0ó ½\f0\cchs186\lang1\langfe1063\fs22 Gabum\f0\cchs186 \'f8\f0\cchs186 \cs44\i0\expndtw0 ugdymas pagal Taylor \cs55 model\f0\cchs186 \'e1 \f0\cchs186 (pagal TayJor, 1986)\par \pard \plain \s9\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx2648\posnegy368\absw0\absh-328\dfrmtxtx40\dfrmtxty0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1063\fs22 Geb\f0\cchs186 \'eb\f0\cchs186 jimas \cs55\i0\expndtw0 susikurti \cs39\i atitinka- \{\f0\cchs186 \'84\f0\cchs186 Surinkite informacij\f0\cchs186 \'e0\f0\cchs186 apie... ii\par \pard \plain \s6\qj\li304\fi0\ri0\sb16\sa0 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 I \cs53\expndtw -10 Gabum\f0\cchs186 \'f8\f0\cchs186 sritis Paai\f0\cchs186 \'f0\f0\cchs186 kinimas\par \pard \plain \s10\qj\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \pvpara\phcol\posnegx6032\posnegy328\absw2600\absh-544\dfrmtxtx40\dfrmtxty0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-170141183460469231731687303715884105727\dn0\f0\cchs186\lang1063\langfe1063\fs22 j mos temos \f0\cchs186 \'fe\f0\cchs186 ini\f0ó €\cchs186 \'f8\f0\cchs186 ir \f0\cchs186 \'e1\f0\cchs186 g\f0\cchs186 \'fb\f0\cchs186 d\f0\cchs186 \'fe\f0\cchs186 i\f0\cchs186 \'f8 \cs55\i0\expndtw0\f0\cchs186 'baz\f0\cchs186 \'e6\f0\cchs186 .\par \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \pvpara\phcol\posnegx5672\posnegy384\absw2960\absh-584\dfrmtxtx40\dfrmtxty0 \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 kuo \f0\cchs186 \'e1\f0\cchs186 vairesni\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'f0\f0\cchs186 altini\f0\cchs186 \'f8\f0\cchs186 ir j\f0\cchs186 \'e0\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 a\-nalizuokite".\pCar \+/v+pard \plain \s11\ql\li0\fi0\ri0\sb0\sa0\sl-296\slmult0\tlul\tx2520 \pvpara\phcol\posnegx5856\posnegy896\absw2776\absh-1656\dfrmtxtx40\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 f Geb\f0\cchs186 \'eb\f0\cchs186 jimas generuoti \cs60\fs20 ne-\line \cs55\fs22 f \f0\cchs186 \'e1\f0\cchs186 prastas, originalias i\f0\cchs186 \'eb\f0\cchs186 /as,\line \cs60\fs20 f\cs53\i\expndtw-10\fs22 pasteb\f0\cchs186 \'eb\'fb\f0\cchs186 naujus \cs55\i0\expndtw0 s\f0\cchs186 \'e0\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 ius,\line \cs53\i\expndtw-10 | papildyti detal\f0\cchs186 \'eb\f0\cchs186 mis, \cs55\i0\expndtw0 kurios\line \cs53\i\expndtw-10\f0\cchs186 \'c1\f0\cchs186 pa\f0\cchs186 \'e1\f0\cchs186 vairioa id\f0\cchs186 \'eb\f0\cchs186 jas,\expndtw0 {\charscalex100\expndtw0\tab }\par \pard \plain \s6\qj\li232\fi0\ri0\sb0\sa0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1 063\fs22 'Akademin\f0\cchs186 \'eb\par \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-272\slmult0 \pvpara\phcol\posnegx5264\posnegy160\absw3368\absh-648\dfrmtxtx40\dfrmtxty0 \cs39\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \'84\f0\cchs186 Sukurkite, kuo \cs60\i0\fs20 pakeisti \f0\cchs186 \'e258\f0\cchs186 prastas energijos r\f0\cchs186 \'fb\'f0\f0\cchs186 is".\par \pard \plain \s7\ql\li0\fi0\ri0\sb0\sa0\sl-320\slmult0 \cs39\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\laangfe1063\fs22 (K\f0\cchs186 \'fb\f0\cchs186 rybos, produktyvioio\par \pard \plain \s13\qj\li5816\fi0\ri0\sb88\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 2.2.1 icntcU\par \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-240\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Gabum\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 sritis\par \pard \plain \s15\ql\li0\fi40\ri0\sb0\sa0\sl-240\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Sprendim\f0\cchs186 \'f8 \f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimo\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-248\slmult0\tlul\tx2736 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Paai\f0\cchs186 \'f0\f0\cchs186 kinimas {\charscalex100\expndtw0\tab }Ll\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas rasti alternatyvas, \cs55\fs22 l.,\par \pard \plain \s15\ql\li32\fi-32\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 jas \f0\cchs186 \'e1\f0\cchs186 vertinti ir priimti tinka- \cs55\fs22 t \cs60\fs20 r m\f0\cchs186 \'e0\f0\cchs186 problemos sprendim\f0\cchs186 \'e0\f0\cchs186 . 1 \cs41\b\i\f0\cchs186\fs10 \'e1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 J\f0\cchs186 \'fe\f0\cchs186 duo\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 pavyzd\f0\cchs186 \'fe\f0\cchs186 iai Nurodykite \cs60\fs20 savo \cs55\fs22 m\f0\cchs186 \'eb\f0\cchs186 giamiausi\f0\cchs186 \'e0\f0\cchs186 \cs60\fs20 I\par \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 a\f0\cchs186 \'f0\f0\cchs186 y toj\f0\cchs186 \'e0\f0\cchs186 , ai\f0\cchs186 \'f0\f0\cchs186 kiai pagr\f0\cchs186 \'e1\f0\cchs186 sdami at- t \cs60\fs20 rumentais \cs55\fs22 savo pasirinkim\f0\cchs186 \'e0\f0\cchs186 it\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 itmetim\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Planavimo\cell \pard \plain \s15\ql\li16\fi-16\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas numatyti kelius ir b\f0\cchs186 \'fb\f0\cchs186 dus id\f0\cchs186 \'eb\f0\cchs186 jai \f0\cchs186 \'e1\f0\cchs186 gyvendinti, nustatant, koki\f0\cchs186 \'f8\f0\cchs186 reikia resur- \cs55\fs22 1 \cs60\fs20 s\f0\cchs186 \'f8\f0\cchs186 , \f0\cchs186 \'e1\'fe\f0\cchs186 velgiant, kokios gali\-mos problemos, ir numatant \f0\cchs186 \'fe\f0\cchs186 ingsnius j\f0\cchs186 \'f8\f0\cchs186 sprendimui, to\-kiu b\f0\cchs186 \'fb\f0\cchs186 du patobulinant plan\f0\cchs186 \'e0\f0\cchs186 .\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 .I\f0\cchs186 \'f0\f0\cchs186 studijav\f0\cchs186 \'e6\f0\cchs186 \cs55\fs22 mitus apie \f0\cchs186 \'f0\f0\cchs186 ik\f0\cchs186 \'f0\f0\cchs186 nos\-\cs60\fs20 parnius, \cs55\fs22 sukurkite tyrimo plan\f0\cchs186 \'e0\f0\cchs186 \cs62\fs18 1\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 savo draug\f0\cchs186 \'f8\f0\cchs186 \cs55\fs22 nuomonei \cs60\fs20 apie \f0\cchs186 \'f0\f0\cchs186 iuos gyv\f0\cchs186 \'fb\f0\cchs186 nus i\f0\cchs186 \'f0\f0\cchs186 tirti\super 41\nosupersub , \f0\cchs186 \'84\f0\cchs186 Sukurkite akcijos prie\f0\cchs186 \'f0\f0\cchs186 \cs55\fs22 r\f0\cchs186 \'fb\f0\cchs186 kym\f0\cchs186 \'e0\f0\cchs186 \cs62\fs18 1 \cs60\fs20 plan\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\br\cchs186 \'f0\f0\cchs186 ius.\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 I\f0\cchs186 \'f0\f0\cchs186 studijuokite N sutart\f0\cchs186 \'e1\f0\cchs186 ir nurodykite \f0\cchs186 \'e1\f0\cchs186 vairias galimas jos i ratifikavimo pasekmes".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Komunikavimo\cell \pard \plain \s15\ql\li0\fi16\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas reik\f0\cchs186 \'f0\f0\cchs186 ti savo id\f0\cchs186 \'eb\f0\cchs186 jas, jausmus, poreikius ir suprasti kitus, vartojant verbalin\f0\cchs186 \'e6\f0\cchs186 ir neverbalin\f0\cchs186 \'e6\f0\cchs186 kalb\f0\cchs186 \'e0\f0\cchs186 .\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 Pademonstruokite savo jaus- \cs55\fs22 1 \cs60\fs20 mus, kai su\f0\cchs186 \'fe\f0\cchs186 inote apie ... \f0\cchs186 \'84\f0\cchs186 Papasakokite apie \f0\cchs186 \'e1\f0\cchs186 vyk\f0\cchs186 \'e1\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 vaiko i ir i\f0\cchs186 \'f0\f0\cchs186 suaugusiojo pozicini". i\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Plan\f0\cchs186 \'f8\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'e1\f0\cchs186 gyvendinimo\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas \f0\cchs186 \'e1\f0\cchs186 gyvendinti plan\f0\cchs186 \'e0\cell \pard \plain \s16\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs43\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw200\dn0\f0\cchs186\lang1063\langfe1063\fs10 \'97\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \f1\cchs186 \u9632\'3f\f0\cchs186 - \f0\cchs186 \'97\'97\f0\cchs186  \expndtw0 *-\expndtw200 \expndtw0 L-\expndtw200 \expndtw0 -\expndtw200 \cs42\b0\expndtw0\f3\cchs186\fs8 i \f4\cchs186 \u9632\'3f\f3\cchs186 \f4\cchs186 \u9632\'3f\f3\cchs186 \cs41\b\i\f0\cchs186\fs10 a \cs40\b0\i0\scaps\f6\cchs186\fs8 - ii \f7\cchs186 \u9632\'3f\f6\cchs186 \cs62\scaps0\f0\cchs186\fs18 1\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 Sukurkite ir \f0\cchs186 \'e1\f0\cchs186 gyvendinkite N 1 renginio plan\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Prognozavimo\cell \pard \plain \s15\ql\li0\fi8\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas numatyti ir pati\-krinti prie\f0\cchs186 \'fe\f0\cchs186 asties ir pasekm\f0\cchs186 \'eb\f0\cchs186 s s\f0\cchs186 \'e0\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 ius.\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 I\f0\cchs186 \'f0\f0\cchs186 studijuokite N sutart\f0\cchs186 \'e1\f0\cchs186 ir nurodykite \f0\cchs186 \'e1\f0\cchs186 vairias galimas jos i ratifikavimo pasekmes".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Komunikavimo\cell \pard \plain \s15\ql\li0\fi16\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Taylor siekia ugdyti kuo daugiau gabum\f0\cchs186 \'f8\f0\cchs186 , kuriais, jo manymu, pasi\f0\cchs186 \'fe\f0\cchs186 ymi vaikai. Tad kuo \f0\cchs186 \'e1\f0\cchs186 vairesniems vaik\f0\cchs186 \'f8\f0\cchs186 gabumams mokytojas skirs d\f0\cchs186 \'eb\f0\cchs186 mes\f0\cchs186 \'e1\f0\cchs186 , tuo daugiau galimybi\f0\cchs186 \'f8\f0\cchs186 , kad vaikas ras srit\f0\cchs186 \'e1\f0\cchs186 , kurios \f0\cchs186 \'fe\f0\cchs186 inovu jis gali tapti. Ta\f0\cchs186 \'e8\f0\cchs186 iau pir\-masis \f0\cchs186 \'f0\f0\cchs186 io modelio etapas - tai vis d\f0\cchs186 \'eb\f0\cchs186 lto akademini\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 ugdymas. Kitas \f0\cchs186 \'fe\f0\cchs186 ingsnis, skirtas mokytojui apsispr\f0\cchs186 \'e6\f0\cchs186 sti, kuri\f0\cchs186 \'e0\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 likusi\f0\cchs186 \'f8\f0\cchs186 a\f0\cchs186 \'f0\f0\cchs186 tuoni\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 sri\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8 \f0\cchs186 jis imasi ugdyti. Paprastai seka, anot autoriaus, tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti tokia: produktyvusis m\f0\cchs186 \'e0\f0\cchs186 stymas, planavimas, sprendim\f0\cchs186 \'f8\f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimas, pian\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 gyvendinimas, \f0\cchs186 \'e1\'fe\f0\cchs186 valgos. Akivaizdu, jog dirbti pagal \f0\cchs186 \'f0\'e1\f0\cchs186 model\f0\cchs186 \'e1\f0\cchs186 mokytojas tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti specialiai pasi\-reng\f0\cchs186 \'e6\f0\cchs186 s, tad modelio autorius si\f0\cchs186 \'fb\f0\cchs186 lo kelet\f0\cchs186 \'e0\f0\cchs186 mokytojo darbo metod\f0\cchs186 \'f8\f0\cchs186 . Pirmuouiu atveju si\f0\cchs186 \'fb\f0\cchs186 loma papildom\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 ugdym\f0\cchs186 \'e0\f0\cchs186 organizuoti baigiantis pamokoms. \f0\cchs186 \'c1\f0\cchs186 prastinis mokymo turinys \f0\cchs186 \'84\f0\cchs186 suspaud\f0\cchs186 \'fe\f0\cchs186 iamas" laike, o atsiradusias 5\f0\cchs186 \'97\f0\cchs186 10 laisvuj minu\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 mokytojas gali i\f0\cchs186 \'f0\f0\cchs186 naudoti pasirinkto gabumo ugdymui. Kai \cs48\b\fs20 mokytojui \cs44\b0\fs22 atrodo, kad jau pasiekta tam tikra pa\f0\cchs186 \'fe\f0\cchs186 anga ugdant pirm\f0\cchs186 \'e0\f0\cchs186 j\f0\cchs186 \'e1\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 o pasirinkt\f0\cchs186 \'f8\f0\cchs186 ga\-\par \sect\sectd \sbkpage\pgwsxn20855\pghsxn13316\marglsxn1080\margrsxn8026\margtsxn360\margbsxn360\cols2\colno1\colw7936\colsr2482\colno2\colw1329 {\header \pard \plain \s11\ql\li0\fi0\ri-7657\sb0\sa0\tx2245 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \'e1\f0\cchs186 Ma\ul b\f0\cchs186 \'fb\f0\cchs186 s vaikai:\ul0 {\charscalex100\expndtw0\tab }\ul ir galimyb\f0\cchs186 \'eb\f0\cchs186 s\par }{\footer \par \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx-720\posnegy0\absw0\absh-254\nowrap\dfrmtxtx34\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 100}}\par \pard \plain \s21\qr\li0\fi0\ri-7657{\sl-240\slmult0\fs20\par }\sb90\sa0 \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 101\par }{\shp {\*\shpinst \shpleft13358\shptop593\shpright14748\shpbottom830\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz1\shplid1{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 317500}}{\sp{\sn dyWrapDistBottom}{\sv 198755}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s31\qj\li0\fi0\ri0\sb0\sa0 \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Rai\f0\cchs186 \'f0\f0\cchs186 kos \cs51\b0 b\f0\cchs186 \'fb\f0\cchs186 dai\par }}}{\shp {\*\shpinst \shpleft11859\shptop534\shpright13172\shpbottom2169\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz0\shplid0{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 279400}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-254\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas\par \pard \plain \s13\ql\li0\fi0\ri0\sb17\sa0\sl-271\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Ugdytojo ir ugdytini\f0\cchs186 \'f8 \f0\cchs186 s\f0\cchs186 \'e0\f0\cchs186 veika, ko\-munikacija\par }}}{\shp {\*\shpinst \shpleft13350\shptop1144\shpright17594\shpbottom2296\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz2\shplid2{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 139700}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-271\slmult0 \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Informacijos srautai \f0\cchs186 \'97\f0\cchs186 \cs48\b Asmenvb\f0\cchs186 \'eb\f0\cchs186 s tobuli* tiesioginiai ir \cs60\b0 gr\f0\cchs186 \'e1\'fe\f0\cchs186 tamieji, ir s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs48\b tobulintai pedagogin\f0\cchs186 \'eb\f0\cchs186 \cs60\b0 sistema sudarymas: \cs48\b\f0\cchs186 \'fb\f0\cchs186 ssionj\par \pard \plain \s33\ql\li2499\fi0\ri0\sb93\sa0 \cs51\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 - b. \cs60 y\super 1\nosupersub "\super 0\nosupersub \cs51 HBB\par }}}{\shp {\*\shpinst \shpleft13299\shptop2228\shpright14205\shpbottom2474\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz4\shplid4{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Saviugda\par }}}{\shp {\*\shpinst \shpleft15874\shptop2279\shpright17187\shpbottom2524\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz5\shplid5{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0 \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Tobulinimasis\par }}}{\shp {\*\shpinst \shpleft11867\shptop2152\shpright13078\shpbottom2812\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz3\shplid3{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 640080}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Individo as\-menyb\f0\cchs186 \'eb\par }}}{\shpgrp{\*\shpinst \shpleft-720\shptop3939\shpright7878\shpbottom12384\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz6\shplid6{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0%n%nsp%nn% dyWrapDistBottom}{\sv 0}}{\sp{\sn groupLeft}{\sv 1067}}{\sp{\sn groupTop}{\sv 6209}}{\sp{\sn groupRight}{\sv 9665}}{\sp{\sn groupBottom}{\sv 14654}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 1067}}{\sp{\sn relTop}{\sv 6429}}{\sp{\sn relRight}{\sv 9665}}{\sp{\sn relBottom}{\sv 14654}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li474\fi0\ri0\sb0\sa0\sl-271\slmult0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1 \cs48\b\fs20 Ugdymo \cs49\b0\fs22 res \cs46\scaps\fs20 f\cs48\b\scaps0 lyb\f0\cchs186 \'eb\f0\cchs186 s lygmu\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 i- \cs49\b0\fs22 Strukt\f0\cchs186 \'fb\f0\cchs186 rini \cs48\b\fs20 o elementas\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 s Rai\f0\cchs186 \'f0\f0\cchs186 kos b\f0\cchs186 \'fb\f0\cchs186 dai\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Funkcijos\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li440\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 j \cs48\b\fs20 Valstybinis\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Valstyb\f0\cchs186 \'eb\f0\cchs186 s politika\cell \pard \plain \s19\ql\li0\fi8\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'d0\f0\cchs186 vietimo politika ir j\f0\cchs186 \'e0 \f0\cchs186 atspindintys \f0\cchs186 \'e1\f0\cchs186 statymai\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Teisinis reguliavimas, u\f0\cchs186 \'fe\f0\cchs186 tikrinantis kiekvie\-nam vaikui (vadinasi, ir gabiam) teis\f0\cchs186 \'e6\f0\cchs186 gauti jo poreikius ir galimybes atitinkant\f0\cchs186 \'e1\f0\cchs186 ugdym\f0\cchs186 \'e0\f0\cchs186 ir ug\-dymosi s\f0\cchs186 \'e0\f0\cchs186 lygas\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li390\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Visuomeninis\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Visuomen\f0\cchs186 \'eb\f0\cchs186 s institutai\cell \pard \plain \s19\ql\li0\fi68\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Vyriausybines insti\-tucijos/ visuomenini\f0\cchs186 \'f8 \f0\cchs186 organizacij\f0\cchs186 \'f8\f0\cchs186 /paramos fond\f0\cchs186 \'f8\f0\cchs186 /auk\f0\cchs186 \'f0\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 moky\-kl\f0\cchs186 \'f8\f0\cchs186 /mokslo institucij\f0\cchs186 \'f8 \cs39\b0\i\f0\cchs186\fs22 tikslin\f0\cchs186 \'eb\f0\cchs186 \cs48\i0\b\fs20 veikla\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Veiklos inicijavimas; koordinavimas, organi\-zavimas, informacijos kaupimas, analiz\f0\cchs186 \'eb\f0\cchs186 ir sklai\-da; gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 paie\f0\cchs186 \'f0\f0\cchs186 kos programos, identifikavi\-mas, globa; mokytoj\f0\cchs186 \'f8\f0\cchs186 ir kit\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'f0\f0\cchs186 vietimo darbuotoj\f0\cchs186 \'f8 \f0\cchs186 rengi mas;ugdymo t\f0\cchs186 \'e6\f0\cchs186 sti\-numo u\f0\cchs186 \'fe\f0\cchs186 tikrinimas; kt.\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 1 Institucinis\par \pard \plain \s25\ql\li0\fi0\ri0\sb0\sa0\sl-983\slmult0 \intbl \cs47\b0\i0\strike0\nosupersub\scaps0\charscalex20\expndtw0\dn19\f0\cchs186\lang1063\langfe1063\fs104 1\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Ugdymo nstituci\f0\cchs186 \'e1\f0\cchs186 os\par \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 i \cs49\b0\fs22 1 \cs48\b\fs20 i\par \pard \plain \s26\ql\li0\fi0\ri0\sb0\sa0\sl-381\slmult0 \intbl \cs50\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn5\f0\cchs186\lang1063\langfe1063\fs38 !\cell \pard \plain \s19\ql\li25\fi-25\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo modelis institucijos lygmeniu \f0\cchs186 \'97\f0\cchs186 mokyklos, papildomojo ugdymo mokyklos, technin\f0\cchs186 \'eb\f0\cchs186 s \{\f0\cchs186 \'fb\f0\cchs186 rybos namai, klas\f0\cchs186 \'eb\f0\cchs186 s, tovyklos, kursai, kon\-kursai ir kt.\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Ugdymo proceso opti\-mizavimas: optimalios ugdymo(si) aplinkos sudarymas, ugdymas, mo\-kymas, veiklos rezultat\f0\cchs186 \'f8 \f0\cchs186 vertinimas, mokymo dife\-rencijavimas ir kt.\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 3371}}{\sp{\sn relTop}{\sv 6209}}{\sp{\sn relRight}{\sv 7988}}{\sp{\sn relBottom}{\sv 6497}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s18\qj\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Gabi\f0\cchs186 \'f8\f0\cchs186 \cs49 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo ir jo s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 modelis\par }}}}}\pard \plain \s14\qr\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 m\f0\cchs186 \'e0\f0\cchs186 gali apib\f0\cchs186 \'fb\f0\cchs186 dinti asmenyb\f0\cchs186 \'eb\f0\cchs186 s saviugda, iritrapersonaliniame lygmenyje \f0\cchs186 \'e1\f0\cchs186 gyjanti gryn\f0\cchs186 \'e0\f0\cchs186 rai\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'e0\f0\cchs186 . \cs45\b\expndtw-10 II \cs55\b0\expndtw0 esm\f0\cchs186 \'eb\f0\cchs186 s \cs53\i\expndtw-10 vis\f0\cchs186 \'f8\f0\cchs186 \cs55\i0\expndtw0 anks\f0\cchs186 \'e8\f0\cchs186 iau min\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 rini\f0\cchs186 \'f8\f0\cchs186 element\f0\cchs186 \'f8\f0\cchs186 funkcionavi\-mo tikslas \cs49 I \cs55 prigimtini\f0\cchs186 \'f8\f0\cchs186 asmens gali\f0\cchs186 \'f8\f0\cchs186 pl\f0\cchs186 \'eb\f0\cchs186 tra ir i\f0\cchs186 \'f0\f0\cchs186 vystymas jo paties j\f0\cchs186 \'eb\f0\cchs186 gomis iki maksimalaus tam asmeniui galimo lygio. Literat\f0\cchs186 \'fb\f0\cchs186 roje (Gross, 1995; Almonaitien\f0\cchs186 \'eb\f0\cchs186 , 1997; Heller, 1999; Gagne, 2004 ir kt.) nurodoma, kad gabaus vaiko savirealizaci\-jai turi (takos jo asmenyb\f0\cchs186 \'eb\f0\cchs186 s nekognityvin\f0\cchs186 \'eb\f0\cchs186 s savyb\f0\cchs186 \'eb\f0\cchs186 s - pasiekim\f0\cchs186 \'f8\f0\cchs186 motyvacija, tei\-giamas \cs45\b\expndtw-10 sav\f0\cchs186 \'e6\f0\cchs186 s \cs55\b0\expndtw0 vertinimas, darbingumas, savikontrol\f0\cchs186 \'eb\f0\cchs186 ir kt. Yra pagrindo manyti, kad tinkamas min\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 GAVUS modelio strukt\f0\cchs186 \'fb\f0\cchs186 rini\f0\cchs186 \'f8\f0\cchs186 element\f0\cchs186 \'f8\f0\cchs186 funkcionavimas palankiai veikia gabaus vaiko asmenyb\f0\cchs186 \'e6\f0\cchs186 , taigi skatina \cs45\b\expndtw-10 j\f0\cchs186 \'e1\f0\cchs186 \cs55\b0\expndtw0 tobul\f0\cchs186 \'eb\f0\cchs186 s lygmuo\par \pard \plain \s11\qj\li0\fi0\ri0\sb42\sa0\sl-246\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Interpersona-linis\chftn{\footnote\pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \chftn Pastaba. Interpersonalinio ir intrapersonalinio \cs48\b\fs20 lygmens \cs55\b0\fs22 elemcr\cs48\b\f0\cchs186\fs20 \'a3\f0\cchs186 E\cs52\b0\expndtw-20\fs30 ^^PK\cs48\b\expndtw0\fs20 ^niaj\par \pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 modelio elementai, kuri\f0\cchs186 \'f8\f0\cchs186 optimaliam veikimui \cs49 ir skirtas ug\strike dy\strike0 m\strike o\strike0 \cs55 s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 mo\-\cs55\fs22 delis\par \pard \plain \s23 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Sukurtasis \expndtw0 GAVUS\expndtw-20 modelis turi savo strukt\f0\cchs186 \'fb\f0\cchs186 r\f0\cchs186 \'e0\f0\cchs186 , funkcijas \cs53\expndtw-10 ir \cs63\expndtw0 funkcionavimo\expndtw-20 \expndtw0 aptin-\cs53\expndtw-10 k\f0\cchs186 \'e0\f0\cchs186 . \cs63\expndtw-20 Modelis turi \expndtw0 paskirti\expndtw-20 bendr\f0\cchs186 \'e0\f0\cchs186 tiksl\f0\cchs186 \'e0\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \cs49\i0\expndtw0 sudaryti s\f0\cchs186 \'e0\f0\cchs186 lygas gdym\f0\cchs186 \'e0\f0\cchs186 ir galimybes saviugdai, pad\f0\cchs186 \'eb\f0\cchs186 ti jam ir skatinti vaik\f0\cchs186 \'e0\f0\cchs186 siekti pilno savojo gabum\f0\cchs186 \'f8\f0\cchs186 po\-tencialo realizavimo ir b\f0\cchs186 \'fb\f0\cchs186 ti naudingam visuomenei, Sis tikslas suteikia modeliui vienov\f0\cchs186 \'eb\f0\cchs186 s, vientisumo.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Kiekvienas strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas turi ir papildom\f0\cchs186 \'f8\f0\cchs186 (i\f0\cchs186 \'f0\f0\cchs186 vestini\f0\cchs186 \'f8\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 ben\-drojo) tiksl\f0\cchs186 \'f8\f0\cchs186 , kurie susij\f0\cchs186 \'e6\f0\cchs186 su funkcijomis, kurias atlieka strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas. Modelis skirtas \f0\cchs186 \'fe\f0\cchs186 mogui, jame vyksta informacijos perdavimo ir valdymo pro\-cesai \f0\cchs186 \'97\f0\cchs186 tai b\f0\cchs186 \'fb\f0\cchs186 dinga visuomenin\f0\cchs186 \'eb\f0\cchs186 ms sistemoms.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis sudarytas i\f0\cchs186 \'f0\f0\cchs186 posistemi\f0\cchs186 \'f8\f0\cchs186 (pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, GVU atskiroje ugdymo institucijoje, jo posistem\f0\cchs186 \'eb\f0\cchs186 - pedagogin\f0\cchs186 \'eb\f0\cchs186 sistema, ir kt.). Visi GAVUS elementai yra vienaip ar kitaip susij\f0\cchs186 \'e6\f0\cchs186 su ugdymu ir jo funkcijomis: \f0\cchs186 \'f0\f0\cchs186 vietimu, lavinimu, aukl\f0\cchs186 \'eb\f0\cchs186 jimu, mokymu, globojimu, formavimu ir kt. Kiekviena jo sud\f0\cchs186 \'eb\f0\cchs186 tin\f0\cchs186 \'eb\f0\cchs186 dalis atlieka tam tikr\f0\cchs186 \'e0\f0\cchs186 funkcij\f0\cchs186 \'e0\f0\cchs186 (jas nurod\f0\cchs186 \'eb\f0\cchs186 me aptardami model\f0\cchs186 \'e1\f0\cchs186 ). Tuomet, kai mo\-delio strukt\f0\cchs186 \'fb\f0\cchs186 riniai elementai funkcionuoja visuose ugdymo realyb\f0\cchs186 \'eb\f0\cchs186 s lygmeny\-se, jis apima daugel\f0\cchs186 \'e1\f0\cchs186 aplinkos veiksni\f0\cchs186 \'f8\f0\cchs186 , kurie yra gabumo virsmo pasiekimais katalizatoriai. Funkciniais ry\f0\cchs186 \'f0\f0\cchs186 iais susij\f0\cchs186 \'e6\f0\cchs186 elementai sukuria palaikan\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'e0\f0\cchs186 aplink\f0\cchs186 \'e0 \f0\cchs186 vienas kito veikimui, o tai savo ruo\f0\cchs186 \'fe\f0\cchs186 tu suma\f0\cchs186 \'fe\f0\cchs186 ina atsitiktinum\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 tiesiogi\-\cs44 niam \cs49 ugdymui, t.y. skatina gabaus vaiko saviugd\f0\cchs186 \'e0\f0\cchs186 .\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelio artimiausioji funkcionavimo aplinka yra \f0\cchs186 \'f0\f0\cchs186 vietimo sistema.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis yra atviras ir dinami\f0\cchs186 \'f0\f0\cchs186 kas. Atviras, nes tai yra socialin\f0\cchs186 \'eb\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 ra, kuriai \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 daro aplinka (netgi jo veikimo realyb\f0\cchs186 \'eb\f0\cchs186 je prasme). Modelio struk\-t\f0\cchs186 \'fb\f0\cchs186 riniai elementai turi daug vidini\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , o jie savo ruo\f0\cchs186 \'fe\f0\cchs186 tu yra atviri aplinkai, kitoms, i\f0\cchs186 \'f0\f0\cchs186 orin\f0\cchs186 \'eb\f0\cchs186 ms socialin\f0\cchs186 \'eb\f0\cchs186 ms strukt\f0\cchs186 \'fb\f0\cchs186 roms, sistemoms, yra dinami\f0\cchs186 \'f0\f0\cchs186 ki, nes i\f0\cchs186 \'f0\f0\cchs186 likti stati\f0\cchs186 \'f0\f0\cchs186 kam, kai kinta aplinka, n\f0\cchs186 \'eb\f0\cchs186 ra \f0\cchs186 \'e1\f0\cchs186 manoma. Dinami\f0\cchs186 \'f0\f0\cchs186 kas jis ir d\f0\cchs186 \'eb\f0\cchs186 l k\f0\cchs186 \'ab\'a9\f0\cchs186 $}\par \pard \plain \s11\qj\li0\fi0\ri0{\sl-240\slmult0\fs20\par }{\sl-240\slmult0\fs20\par }\sb121\sa0\sl-263\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Intrapersona-linis\chftn{\footnote\pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \chftn Pastaba. Interpersonalinio ir intrapersonalinio \cs48\b\fs20 lygmens \cs55\b0\fs22 elemcr\cs48\b\f0\cchs186\fs20 \'a3\f0\cchs186 E\cs52\b0\expndtw-20\fs30 ^^PK\cs48\b\expndtw0\fs20 ^niaj\par \pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 modelio elementai, kuri\f0\cchs186 \'f8\f0\cchs186 optimaliam veikimui \cs49 ir skirtas ug\strike dy\strike0 m\strike o\strike0 \cs55 s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 mo\-\cs55\fs22 delis\par \pard \plain \s23 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Sukurtasis \expndtw0 GAVUS\expndtw-20 modelis turi savo strukt\f0\cchs186 \'fb\f0\cchs186 r\f0\cchs186 \'e0\f0\cchs186 , funkcijas \cs53\expndtw-10 ir \cs63\expndtw0 funkcionavimo\expndtw-20 \expndtw0 aptin-\cs53\expndtw-10 k\f0\cchs186 \'e0\f0\cchs186 . \cs63\expndtw-20 Modelis turi \expndtw0 paskirti\expndtw-20 bendr\f0\cchs186 \'e0\f0\cchs186 tiksl\f0\cchs186 \'e0\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \cs49\i0\expndtw0 sudaryti s\f0\cchs186 \'e0\f0\cchs186 lygas gabiems valkams, nepriklausomai nuo j\f0\cchs186 \'f8\f0\cchs186 socialin\f0\cchs186 \'eb\f0\cchs186 s pad\f0\cchs186 \'eb\f0\cchs186 ties, gyvenamosios vietos, am\-\f0\cchs186 \'fe\f0\cchs186 iaus, lyties ir kt., rinktis j\f0\cchs186 \'f8\f0\cchs186 poreikius atitinkanti ugdym\f0\cchs186 \'e0\f0\cchs186 ir galimybes saviugdai, pad\f0\cchs186 \'eb\f0\cchs186 ti jam ir skatinti vaik\f0\cchs186 \'e0\f0\cchs186 siekti pilno savojo gabum\f0\cchs186 \'f8\f0\cchs186 po\-tencialo realizavimo ir b\f0\cchs186 \'fb\f0\cchs186 ti naudingam visuomenei, Sis tikslas suteikia modeliui vienov\f0\cchs186 \'eb\f0\cchs186 s, vientisumo.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Kiekvienas strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas turi ir papildom\f0\cchs186 \'f8\f0\cchs186 (i\f0\cchs186 \'f0\f0\cchs186 vestini\f0\cchs186 \'f8\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 ben\-drojo) tiksl\f0\cchs186 \'f8\f0\cchs186 , kurie susij\f0\cchs186 \'e6\f0\cchs186 su funkcijomis, kurias atlieka strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas. Modelis skirtas \f0\cchs186 \'fe\f0\cchs186 mogui, jame vyksta informacijos perdavimo ir valdymo pro\-cesai \f0\cchs186 \'97\f0\cchs186 tai b\f0\cchs186 \'fb\f0\cchs186 dinga visuomenin\f0\cchs186 \'eb\f0\cchs186 ms sistemoms.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis sudarytas i\f0\cchs186 \'f0\f0\cchs186 posistemi\f0\cchs186 \'f8\f0\cchs186 (pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, GVU atskiroje ugdymo institucijoje, jo posistem\f0\cchs186 \'eb\f0\cchs186 - pedagogin\f0\cchs186 \'eb\f0\cchs186 sistema, ir kt.). Visi GAVUS elementai yra vienaip ar kitaip susij\f0\cchs186 \'e6\f0\cchs186 su ugdymu ir jo funkcijomis: \f0\cchs186 \'f0\f0\cchs186 vietimu, lavinimu, aukl\f0\cchs186 \'eb\f0\cchs186 jimu, mokymu, globojimu, formavimu ir kt. Kiekviena jo sud\f0\cchs186 \'eb\f0\cchs186 tin\f0\cchs186 \'eb\f0\cchs186 dalis atlieka tam tikr\f0\cchs186 \'e0\f0\cchs186 funkcij\f0\cchs186 \'e0\f0\cchs186 (jas nurod\f0\cchs186 \'eb\f0\cchs186 me aptardami model\f0\cchs186 \'e1\f0\cchs186 ). Tuomet, kai mo\-delio strukt\f0\cchs186 \'fb\f0\cchs186 riniai elementai funkcionuoja visuose ugdymo realyb\f0\cchs186 \'eb\f0\cchs186 s lygmeny\-se, jis apima daugel\f0\cchs186 \'e1\f0\cchs186 aplinkos veiksni\f0\cchs186 \'f8\f0\cchs186 , kurie yra gabumo virsmo pasiekimais katalizatoriai. Funkciniais ry\f0\cchs186 \'f0\f0\cchs186 iais susij\f0\cchs186 \'e6\f0\cchs186 elementai sukuria palaikan\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'e0\f0\cchs186 aplink\f0\cchs186 \'e0 \f0\cchs186 vienas kito veikimui, o tai savo ruo\f0\cchs186 \'fe\f0\cchs186 tu suma\f0\cchs186 \'fe\f0\cchs186 ina atsitiktinum\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 tiesiogi\-\cs44 niam \cs49 ugdymui, t.y. skatina gabaus vaiko saviugd\f0\cchs186 \'e0\f0\cchs186 .\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelio artimiausioji funkcionavimo aplinka yra \f0\cchs186 \'f0\f0\cchs186 vietimo sistema.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis yra atviras ir dinami\f0\cchs186 \'f0\f0\cchs186 kas. Atviras, nes tai yra socialin\f0\cchs186 \'eb\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 ra, kuriai \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 daro aplinka (netgi jo veikimo realyb\f0\cchs186 \'eb\f0\cchs186 je prasme). Modelio struk\-t\f0\cchs186 \'fb\f0\cchs186 riniai elementai turi daug vidini\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , o jie savo ruo\f0\cchs186 \'fe\f0\cchs186 tu yra atviri aplinkai, kitoms, i\f0\cchs186 \'f0\f0\cchs186 orin\f0\cchs186 \'eb\f0\cchs186 ms socialin\f0\cchs186 \'eb\f0\cchs186 ms strukt\f0\cchs186 \'fb\f0\cchs186 roms, sistemoms, yra dinami\f0\cchs186 \'f0\f0\cchs186 ki, nes i\f0\cchs186 \'f0\f0\cchs186 likti stati\f0\cchs186 \'f0\f0\cchs186 kam, kai kinta aplinka, n\f0\cchs186 \'eb\f0\cchs186 ra \f0\cchs186 \'e1\f0\cchs186 manoma. Dinami\f0\cchs186 \'f0\f0\cchs186 kas jis ir d\f0\cchs186 \'eb\f0\cchs186 l k\f0\cchs186 \'ab\'a9\f0\cchs186 $}\par \sect\sectd \sbknone\pgwsxn20126\pghsxn13892\marglsxn733\margrsxn360\margtsxn360\margbsxn360\cols1\colsx60 {\header }{\footer \pard \plain \s27\qr\li0\fi0\ri0\sb0\sa0 \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 123}}\par }{\pard\plain \sb1144\sa0\sl-240\slmult0\fs20\par}\pard \plain \s29\qj\li11181\fi0\ri0\sb51\sa102 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4. \cs55 Gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ufidymo ir jo s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 mo\ul delio rai\f0\cchs186 \'f0\f0\cchs186 kos\ul0 \cs45\b\expndtw-10\f0\cchs186 \'c1\f0\cchs186 \cs55\b0\ul\expndtw0 jetuvo\f0\cchs186 \'e1\f0\cchs186 e \cs60\fs20 pristatymas\par \sect\sectd \sbknone\pgwsxn20126\pghsxn13892\marglsxn733\margrsxn453\margtsxn360\margbsxn360\cols2\colno1\colw8123\colsr2431\colno2\colw8385 {\shpgrp{\*\shpinst \shpleft10622\shptop263\shpright18737\shpbottom1966\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz7\shplid7{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 107315}}{\sp{\sn dyWrapDistBottom}{\sv 48260}}{\sp{\sn groupLeft}{\sv 12045}}{\sp{\sn groupTop}{\sv 2846}}{\sp{\sn groupRight}{\sv 20160}}{\sp{\sn groupBottom}{\sv 4549}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 12045}}{\sp{\sn relTop}{\sv 2922}}{\sp{\sn relRight}{\sv 20160}}{\sp{\sn relBottom}{\sv 4100}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Nr.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0\sl-144\slmult0\tlhyph\tx3744\tlul\tx4574 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn2\f0\cchs186\lang1063\langfe1063\fs22 rr-ri{\charscalex100\expndtw0\tab }\cs61\fs12 _ {\charscalex100\expndtw0\tab } J \f0\cchs186 \'bb\par \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Teiginys \f0\cchs186 \'97\cell \pard \plain \s35\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 mreies\par \pard \plain \s3\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Vid *\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 t\f0\cchs186 \'e6\f0\cchs186 sinys\par \pard \plain \s24\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 Qt \cs60\fs20 n\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 11.\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Tr\f0\cchs186 \'fb\f0\cchs186 ksta mokini\f0\cchs186 \'f8\f0\cchs186 t\f0\cchs186 \'eb\f0\cchs186 v\f0\cchs186 \'f8\f0\cchs186 palaikymo, pritarimo\cell \pard \plain \s5\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 00\cs49\fs22 .24\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.21\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 12.\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 [Tr\f0\cchs186 \'fb\f0\cchs186 ksta mokyklos administracijos paskatinimo ir \cs57\expndtw10\fs16 nri\cs58\expndtw0\fs20 -^mn\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\tlhyph\tx5472\tlhyph\tx6107 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 maksimalus \cs60\b0 galimas trukume .v\cs57\b\expndtw10\fs16 .-rr.\cs59\i\expndtw-10\f9\cchs186\fs22 ^-ETrr\cs60\b0\i0\expndtw0\f0\cchs186\fs20 {\charscalex100\expndtw0\tab }rr{\charscalex100\expndtw0\tab }1\cell \pard \plain \s5\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 00\cs49\fs22 .41\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.22\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 18025}}{\sp{\sn relTop}{\sv 2846}}{\sp{\sn relRight}{\sv 20152}}{\sp{\sn relBottom}{\sv 3117}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\ql\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4.2.3 lentel\f0\cchs186 \'eb\f0\cchs186 s t\f0\cchs186 \'e6\f0\cchs186 sinys\par }}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 12629}}{\sp{\sn relTop}{\sv 4074}}{\sp{\sn relRight}{\sv 20100}}{\sp{\sn relBottom}{\sv 4549}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s22\ql\li0\fi2821\ri0\sb0\sa0\sl-161\slmult0\tlhyph\tx3456\tldot\tx3812 \cs62\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs18 _ ,{\charscalex100\expndtw0\tab }{\charscalex100\expndtw0\tab }.\f0\cchs186 \'84\'ab\f0\cchs186 , , icigu \expndtw20 trukumo\expndtw0 \cs55\fs22 visi\f0\cchs186 \'f0\f0\cchs186 kai nejau\f0\cchs186 -\line \'e8\f0\cchs186 iama \f0\cchs186 \'97\f0\cchs186 vertinimas \cs49\f0\cchs186 \'84\f0\cchs186 -2".\par }}}}}{\shpgrp{\*\shpinst \shpleft-373\shptop6683\shpright8098\shpbottom12511\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr2\shpwrk3\shpz8\shplid8{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn groupLeft}{\sv 1050}}{\sp{\sn groupTop}{\sv 9267}}{\sp{\sn groupRight}{\sv 9521}}{\sp{\sn groupBottom}{\sv 15095}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 1050}}{\sp{\sn relTop}{\sv 10275}}{\sp{\sn relRight}{\sv 9521}}{\sp{\sn relBottom}{\sv 15095}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li246\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Nr\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Teiginys\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Vid.*\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 St. n.\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1 \super 1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta u\f0\cchs186 \'fe\f0\cchs186 mokes\f0\cchs186 \'e8\f0\cchs186 io u\f0\cchs186 \'fe\f0\cchs186 \cs56\fs18 papildom\f0\cchs186 \'e0\f0\cchs186 \cs55\fs22 darb\f0\cchs186 \'e0\f0\cchs186 ,.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.43\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.84\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 12.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta materialinio paskatinimo itin gabiems mokiniams.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.35\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.87\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 13.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta bendros itin gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo politikos visos i\f0\cchs186 \'f0\f0\cchs186 liet \cs52\expndtw-20\fs30 j \cs44\expndtw0\fs22 mastu.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.27\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.85\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 14.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 [Tr\f0\cchs186 \'fb\f0\cchs186 ksta apr\f0\cchs186 \'fb\f0\cchs186 pinimo reikalinga mokymo metodine med\f0\cchs186 \'fe\f0\cchs186 iaga\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.22\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.96\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 15.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta kvalifikacijos k\f0\cchs186 \'eb\f0\cchs186 limo kurs\f0\cchs186 \'f8\f0\cchs186 itin gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo \cs44 tems.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .20\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.91\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0\sl-407\slmult0 \intbl \cs52\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw-20\up2\f0\cchs186\lang1063\langfe1063\fs30 j \cs44\expndtw0\fs22 6. \cs55 j\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-313\slmult0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta \cs55 bendradarbiavimo tu auk\f0\cchs186 \'f0\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 mokykl\f0\cchs186 \'f8\f0\cchs186 d\f0\cchs186 \'eb\f0\cchs186 stytojais, \cs44 mokalininkaif.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .04\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.99\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-313\slmult0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 7. \cs55 1 \cs44 Tr\f0\cchs186 \'fb\f0\cchs186 ksta literatu \expndtw-20 rot\expndtw0 \cs54\i\expndtw-20 apie itin \cs55\i0\expndtw0 gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 pa\f0\cchs186 \'fe\f0\cchs186 inim\f0\cchs186 \'e0\f0\cchs186 , ugdym\f0\cchs186 \'e0\f0\cchs186 , \cs52\expndtw-20\fs30 j \cs55\expndtw0\fs22 psichologij\f0\cchs186 \'e0\f0\cchs186 , \cs44 kir\f0\cchs186 \'f8\f0\cchs186 \cs55\f0\cchs186 \'f0\f0\cchs186 ali\f0\cchs186 \'f8\f0\cchs186 patirt j.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .00\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.97\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 8. \cs55 j Tr\f0\cchs186 \'fb\f0\cchs186 ksta \cs44 bendradarbiavimo \cs55 su patyrusiais \f0\cchs186 \'f0\f0\cchs186 ioje srityje kolegomis,\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.88\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.02\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s32\ql\li0\fi0\ri0\sb0\sa0\sl-356\slmult0 \intbl \cs52\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw-20\dn4\f0\cchs186\lang1063\langfe1063\fs30 1 \cs49\expndtw0\fs22 1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 'r\f0\cchs186 \'fb\f0\cchs186 ksta \cs44 tinkamo \cs55 pasirengimo auk\f0\cchs186 \'f0\f0\cchs186 tojoje mokykloje.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.56\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.17\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 10. 7\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 r\f0\cchs186 \'fb\f0\cchs186 ksta galimybi\f0\cchs186 \'f8\f0\cchs186 \cs44 naudotis \cs55 kompiuteriu ir internetu.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 -0.19\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.33\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 2151}}{\sp{\sn relTop}{\sv 9267}}{\sp{\sn relRight}{\sv 8724}}{\sp{\sn relBottom}{\sv 10300}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s2\qj\li0\fi0\ri0\sb0\sa0\sl-330\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Duomenys apie tai, ko mokytojams tr\f0\cchs186 \'fb\f0\cchs186 ksta darbui su itin\par \pard \plain \s20\ql\li0\fi2406\ri0\sb0\sa0\sl-330\slmult0\tlul\tx805 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 gabiais vaikais\line \lang1033 {\charscalex100\expndtw0\tab }\ul\lang1063 (Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , Janilionis,\ul0 Almonaitien\f0\cchs186 \'eb\f0\cchs186 , \cs49 2002)\par }}}}}\pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-322\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 niams, galima manyti, kad jaunesni\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 klasi\f0\cchs186 \'f8\f0\cchs186 gabi\f0\cchs186 \'f8\f0\cchs186 mokini\f0\cchs186 \'f8\f0\cchs186 ugdymo rezulta\-tai \f0\cchs186 \'fe\f0\cchs186 inomi ir fiksuojami tik klases ir mokyklos (atskirais atvejais savivaldyb\f0\cchs186 \'eb\f0\cchs186 s) lygmeniu. be to, olimpiad\f0\cchs186 \'f8\f0\cchs186 rezultatai - tai tik pasiekimai, \cs49 o \cs55 kas daroma klas\f0\cchs186 \'eb\-\f0\cchs186 je, \cs53\i\expndtw-10 mokykloje, \cs55\i0\expndtw0 kad tie pasiekimai b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 tokie, ir \cs49 ar \cs55 tie pasiekimai \f0\cchs186 \'97\f0\cchs186 tai mokytojo ir mokinio darbo rezultatas ar tik mokinio potencialo \{vertinimas, informaci\-jos taip pat neturime arba turime labai nedaug \cs49 (\f0\cchs186 \'fe\f0\cchs186 r. \cs55 Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , \cs49 1997,1998, \cs55 2003, Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , Janilionis, Almonaitien\f0\cchs186 \'eb\f0\cchs186 , \cs49 2002).\par \pard \plain \s2\qj\li0\fi576\ri0\sb0\sa0\sl-322\slmult0 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Mokytoj\f0\cchs186 \'f8\f0\cchs186 rengimas. \cs55\i0\expndtw0 N\f0\cchs186 \'eb\f0\cchs186 vienas Lietuvos universitetas, rengiantis mokyto\-jus, nesi\f0\cchs186 \'fb\f0\cchs186 lo pirmos ar antros pakopos studij\f0\cchs186 \'f8\f0\cchs186 programos, kurios paskirtis b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8 \f0\cchs186 ai\f0\cchs186 \'f0\f0\cchs186 kiai orientuota \f0\cchs186 \'e1\f0\cchs186 gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo specialisto parengim\f0\cchs186 \'e0\f0\cchs186 . Per\f0\cchs186 \'fe\f0\cchs186 i\f0\cchs186 \'fb\f0\cchs186 r\f0\cchs186 \'eb\f0\cchs186 jus mokytoj\f0\cchs186 \'f8\f0\cchs186 rengimo programas Vilniaus pedagoginiame, \f0\cchs186 \'d0\f0\cchs186 iauli\f0\cchs186 \'f8\f0\cchs186 , Kauno tech\-nologijos bei Vytauto Did\f0\cchs186 \'fe\f0\cchs186 iojo universitetuose, rasti tik du, be to, tik \cs63\i\expndtw-20 pasiren\-kamieji \cs55\i0\expndtw0 gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 problemoms skirti moduliai. Tai Vilniaus pedagoginiame universitete neakivaizdininkams \cs63\i\expndtw-20 si\f0\cchs186 \'fb\f0\cchs186 lomas \cs55\i0\expndtw0 modulis \f0\cchs186 \'84\f0\cchs186 Gabi\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 atpa\f0\cchs186 \'fe\f0\cchs186 inimas ir ugdymo galimyb\f0\cchs186 \'eb\f0\cchs186 s" bei \f0\cchs186 \'d0\f0\cchs186 iauli\f0\cchs186 \'f8\f0\cchs186 pedagoginiame universitete si\f0\cchs186 \'fb\f0\cchs186 lomas modulis \f0\cchs186 \'84\f0\cchs186 Gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 psichologija".\par \pard \plain \s23\qj\li0\fi576\ri0\sb8\sa0\sl-322\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Lietuvos mokytojams, \cs49 tyrim\f0\cchs186 \'f8\f0\cchs186 duomenimis (Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , \cs55 Janilionis, \cs49 Almonaitien\f0\cchs186 \'eb\f0\cchs186 , \cs55 2002), darbui su \cs49 gabiais vaikais tr\f0\cchs186 \'fb\f0\cchs186 ksta \cs55 ir tinkamo pasirengimo auk\f0\cchs186 \'f0\f0\cchs186 tojoje \cs49 mokykloje, ir kir\f0\cchs186 \'f8\f0\cchs186 \cs55 dalyk\f0\cchs186 \'f8\f0\cchs186 \cs49 (\f0\cchs186 \'fe\f0\cchs186 r. 4.2.3 lentel\f0\cchs186 \'e6\f0\cchs186 ).\par \pard \plain \s11\qr\li0\fi0\ri0{\sl-240\slmult0\fs20\p`r }\sb65\sa0 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4.2.3 \cs55 lentel\f0\cchs186 \'eb\par \pard \plain \s29\ql\li0\fi568\ri0\sb0\sa0\sl-322\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Lentel\f0\cchs186 \'eb\f0\cchs186 je teiginiai pateikti eil\f0\cchs186 \'eb\f0\cchs186 s tvarka pagal tr\f0\cchs186 \'fb\f0\cchs186 kumo \f0\cchs186 \'e1\f0\cchs186 vertinimo vidur\-k\f0\cchs186 \'e1\f0\cchs186 . Matome, jog labiausiai, mokytoj\f0\cchs186 \'f8\f0\cchs186 nuomone, tr\f0\cchs186 \'fb\f0\cchs186 ksta u\f0\cchs186 \'fe\f0\cchs186 mokes\f0\cchs186 \'e8\f0\cchs186 io u\f0\cchs186 \'fe\f0\cchs186 papil\-dom\f0\cchs186 \'e0\f0\cchs186 darb\f0\cchs186 \'e0\f0\cchs186 , materialinio paskatinimo gabiems vaikams ir bendros gabi\f0\cchs186 \'f8\f0\cchs186 vai\-k\f0\cchs186 \'f8\f0\cchs186 ugdymo politikos visos \f0\cchs186 \'f0\f0\cchs186 alies mastu. Su pirmu teiginiu visi\f0\cchs186 \'f0\f0\cchs186 kai sutiko \cs49 59%, \cs55 sutiko \cs49 30% \cs55 (t.y. i\f0\cchs186 \'f0\f0\cchs186 viso taip teig\f0\cchs186 \'eb\f0\cchs186 \cs49 89%) \cs55 mokytoj\f0\cchs186 \'f8\f0\cchs186 , dar \cs49 7% \cs55 renkasi neutrali\f0\cchs186 \'e0 \f0\cchs186 pozicij\f0\cchs186 \'e0\f0\cchs186 . \cs49 88% \cs55 mokytoj\f0\cchs186 \'f8\f0\cchs186 mano, jog tr\f0\cchs186 \'fb\f0\cchs186 ksta materialinio paskatinimo patiems gabiems mokiniams. \cs49 87% \cs55 respondent\f0\cchs186 \'f8\f0\cchs186 mano, kad tr\f0\cchs186 \'fb\f0\cchs186 ksta bendros itin gabi\f0\cchs186 \'f8 \f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo politikos \f0\cchs186 \'d0\f0\cchs186 alies mastu; \cs49 84% \cs55 - apr\f0\cchs186 \'fb\f0\cchs186 pinimo mokymo metodi\-ne med\f0\cchs186 \'fe\f0\cchs186 iaga; \cs49 86% \cs55 - kvalifikacijos k\f0\cchs186 \'eb\f0\cchs186 limo kurs\f0\cchs186 \'f8\f0\cchs186 , \cs49 79% \cs55 - bendradarbiavimo su mokslininkais; \cs49 76% \cs55 - atitinkamos literat\f0\cchs186 \'fb\f0\cchs186 ras; \cs49 74% \cs55 - bendradarbiavimo su patyrusiais \f0\cchs186 \'f0\f0\cchs186 ioje srityje kolegomis (neutralus vertinimas - \cs49 14%). \cs55 Tinkamo pasirengimo auk\f0\cchs186 \'f0\f0\cchs186 tojoje mokykloje pasigedo \cs49 60% \cs55 apklaust\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 mokytoj\f0\cchs186 \'f8\f0\cchs186 , tik penktadalis \cs49 (21%) \cs55 j\f0\cchs186 \'f8\f0\cchs186 sutiko, jog auk\f0\cchs186 \'f0\f0\cchs186 toji mokykla pareng\f0\cchs186 \'eb\f0\cchs186 j\f0\cchs186 \'e1\f0\cchs186 /j\f0\cchs186 \'e0\f0\cchs186 \f0\cchs186 \'f0\f0\cchs186 iam darbui. Malonu pasteb\f0\cchs186 \'eb\f0\cchs186 ti, jog \cs49 56% \cs55 mokytoj\f0\cchs186 \'f8\f0\cchs186 darbui su itin gabiais vaikais \expndtw-20 yra\expndtw0 skatina\-mi ir palaikomi mokyklos administracijos (neutralum\f0\cchs186 \'e0\f0\cchs186 vertinant teigin\f0\cchs186 \'e1\f0\cchs186 rinko\-si \cs49 18%). \cs55 Nema\f0\cchs186 \'fe\f0\cchs186 ai mokytoj\f0\cchs186 \'f8\f0\cchs186 turi galimybi\f0\cchs186 \'f8\f0\cchs186 naudotis kompiuteriu ir internetu \cs49 (49% \cs55 nejau\f0\cchs186 \'e8\f0\cchs186 ia tr\f0\cchs186 \'fb\f0\cchs186 kumo, \cs49 16% \cs55 lieka neutral\f0\cchs186 \'fb\f0\cchs186 s, \cs49 35% \cs55 tr\f0\cchs186 \'fb\f0\cchs186 ksta tokios galimybes). \cs49 46% \cs55 mokytoj\f0\cchs186 \'f8\f0\cchs186 jau\f0\cchs186 \'e8\f0\cchs186 ia t\f0\cchs186 \'eb\f0\cchs186 v\f0\cchs186 \'f8\f0\cchs186 palaikym\f0\cchs186 \'e0\f0\cchs186 , \cs49 31% \cs55 tokio palaikymo pasigenda.\par \pard \plain \s17\ql\li0\fi0\ri0\sb0\sa0\sl-322\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Anketoje buvo palikta vieta laisvam atsakymui, ko \cs64\b\expndtw-20\fs26 dar tr\f0\cchs186 \'fb\f0\cchs186 ksta, \cs55\b0\expndtw0\f0\cchs186\fs22 \'e1\f0\cchs186 ra\f0\cchs186 \'f0\f0\cchs186 yti. Pa\-min\f0\cchs186 \'eb\f0\cchs186 tini tokie dalykai, kuri\f0\cchs186 \'f8\f0\cchs186 mokytojai nurod\f0\cchs186 \'eb\f0\cchs186 pasigendantys (kalba netaisyta): \cs63\i\expndtw-20 d\f0\cchs186 \'eb\f0\cchs186 mesio, sistemos Siame darbe; \f0\cchs186 \'e1\f0\cchs186 d\f0\cchs186 \'eb\f0\cchs186 jimu \f0\cchs186 \'e1\f0\cchs186 J\f0\cchs186 \'e1\f0\cchs186 darini plali\f0\cchs186 \'e0\f0\cchs186 ja prasme; pa$d laikmet\f0\cchs186 \'e1 \f0\cchs186 apr\f0\cchs186 \'fb\f0\cchs186 pinto kabineto; lenko; &bi\f0\cchs186 \'f8\f0\cchs186 mokini\f0\cchs186 \'f8\f0\cchs186 su ffra mokymosi motyvacija; skiriam\f0\cchs186 \'e0 \f0\cchs186 papildomai pamoki\f0\cchs186 \'e1\f0\cchs186 mokytojai - olimpiadoms ruo\f0\cchs186 \'f0\f0\cchs186 tis; materialin\f0\cchs186 \'eb\f0\cchs186 s bas\f0\cchs186 \'e6\f0\cchs186 s, ma&u* mokint\f0\cchs186 \'e0\f0\cchs186 skaiiiaus klas\f0\cchs186 \'eb\f0\cchs186 je, nes bana labai sunku diferencijuotai dirbti, meni nesp\f0\cchs186 \'eb\f0\cchs186 ja, kiti neturi k\f0\cchs186 \'e0\f0\cchs186 neikti, vadov\f0\cchs186 \'eb\f0\cchs186 liuose dainai n\f0\cchs186 \'eb\f0\cchs186 ra tinkam\f0\cchs186 \'e0\f0\cchs186 nf\f0\cchs186 \'eb\f0\cchs186 eoti\f0\cchs186 \'e0\f0\cchs186 ; dau\f0\cchs186 \'fe\f0\cchs186 tu stovykl\f0\cchs186 \'f8 \sub\f0\cchs186 ga\nosupersub /,iems tankiniam respublikos mastu, bet kad \f0\cchs186 \'e1\f0\cchs186 jos patekt\f0\cchs186 \'f8\f0\cchs186 irprmncijos vaikai, \expndtw0 o\expndtw-20 \expndtw0 neHk\expndtw-20 didf\f0\cchs186 \'e1\f0\cchs186 nj\f0\cchs186 \'f8\f0\cchs186 miest\f0\cchs186 \'f8\f0\cchs186 ; mokini\f0\cchs186 \'f8\f0\cchs186 suinterrsmtama mokytis; laiko per pamokas m po pamnk\f0\cchs186 \'e0\f0\cchs186 ; bijau perkrauti mokinis nereikt\f0\cchs186 \'f8\f0\cchs186 niveliuoti \f0\cchs186 \'e1\f0\cchs186 tatna\f0\cchs186 \'f8\f0\cchs186 j/\f0\cchs186 \'f8\f0\cchs186 \expndtw0 irj\f0\cchs186 \'f8\expndtw-20\f0\cchs186 sukart\f0\cchs186 \'f8 \f0\cchs186 proffttm\f0\cchs186 \'f8\f0\cchs186 .\par \pard \plain \s34\qc\li0\fi0\ri0\sb102\sa0 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Apilmidrinamosios i\f0\cchs186 \'f0\f0\cchs186 vados\par \pard \plain \s29\ql\li584\fi0\ri0\sb110\sa0 \cs64\i0\strike0\nosupersub\b\scaps0\charscalexó š100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs26 Tiriant GAVUS \cs55\b0\expndtw0\fs22 modelio rai\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'e0\f0\cchs186 visuomeniniame lygmenyje, i\f0\cchs186 \'f0\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'eb\f0\cchs186 jo\par \pard \pla in \s11\ql\li0\fi4294967295\ri0\sb102\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 tokios problemos:\par }
diff --git a/sw/qa/core/data/rtf/pass/forcepoint-96.rtf b/sw/qa/core/data/rtf/pass/forcepoint-96.rtf
new file mode 100644
index 000000000000..1e5a05d4801f
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/forcepoint-96.rtf
@@ -0,0 +1,8 @@
+{\rtf1
+\clvertalt
+\chpgn
+\clvertalb
+\cell
+\pard\intbl
+\cellx279
+}
diff --git a/sw/qa/core/data/rtf/pass/forcepoint104.rtf b/sw/qa/core/data/rtf/pass/forcepoint104.rtf
new file mode 100644
index 000000000000..2effec385394
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/forcepoint104.rtf
@@ -0,0 +1,571 @@
+{\rtf1\ansi\deflang1045\ftnbj\uc1\deff1
+{\fonttbl{\f0 \froman \fcharset238 Times New Roman;}{\f1 \fswiss \fcharset23838 Arial;}{\f2 \fnil \fcharset238 Wingdings;}{\f3 \froman \fcharset23838 Times New Roman;}{\f4 \fswiss \fcharset238 Arial;}{\f5 \fswiss \fcharset238 Times New Roman;}{\f6 \fswiss \fcharset23838
+Lucida Sans;}{\f7 \froman \fcharset238 Symbol;}{\f8 \fswiss \fcharset238 Lucida Sans;}{\f9 \froman \fcharset238 Times New Roman;}{\f10 \fnil Courier New;}}
+{\colortbl ;\red255\green255\blue255 ;\red0\green0\blue0 ;\red0\green64\blue128 ;\red255\green255\blue128 ;\red0\green0\blue255 ;\red0\green0\blue160 ;\red0\green0\blue0 ;\red0\green0\blue0 ;\red0\green0\blue0 ;\red131\green58\blue20 ;\red164\green79\blue36
+;\red162\green78\blue34 ;\red255\green255\blue255 ;\red254\green255\blue255 ;\red250\green255\blue255 ;\red251\green255\blue255 ;\red27\green10\blue0 ;\red195\green114\blue46 ;\red252\green255\blue255 ;\red249\green255\blue255 ;\red17\green7\blue0 ;\red218\green211\blue185
+;\red179\green89\blue0 ;\red170\green83\blue0 ;\red209\green110\blue0 ;\red237\green167\blue86 ;\red242\green153\blue51 ;\red220\green127\blue19 ;\red0\green0\blue9 ;\red0\green0\blue2 ;\red0\green32\blue0 ;}
+{\stylesheet{\fs20\cf0\cb1\ulc0 Normal;}{\cs1\f3\fs20\cf0\cb1\ulc0 Default Paragraph Font;}{\s2\f3\fs24\cf0\cb1\ulc2 TOC 1;}{\s3\f3\fs24\cf0\cb1\ulc2\li180 TOC 2;}{\s4\f3\fs24\cf0\cb1\ulc2\li360 TOC 3;}{\s5\f3\fs24\cf0\cb1\ulc2\li540 TOC 4;}{\s6\f3\fs24\cf0\cb1\ulc2\li720
+TOC 5;}{\s7\f3\fs24\cf0\cb1\ulc2\li900 TOC 6;}{\s8\f3\fs24\cf0\cb1\ulc2\li1080 TOC 7;}{\s9\f3\fs24\cf0\cb1\ulc2\li1260 TOC 8;}{\s10\f3\fs24\cf0\cb1\ulc2\li1440 TOC 9;}{\s11\f1\fs32\b\cf3\cb1\ulc0\sb240\sa60 Heading 1;}{\s12\f1\fs28\b\cf3\cb1\ulc0\sb240\sa60\outlinelevel1
+Heading 2;}{\s13\f1\fs26\b\cf3\cb1\ulc0\sb240\sa60\outlinelevel2 Heading 3;}{\s14\f3\fs28\b\cf3\cb1\ulc0\sb240\sa60\outlinalevel3 Heading 4;}{\s15\f3\fs26\b\i\cf3\cb1\ulc0\sb240\sa60\outlinelevel4 Heading 5;}{\s16\f3\fs22\b\cf3\cb1\ulc0\sb240\sa60\outlinelevel5
+Heading 6;}{\s17\f3\fs24\cf3\cb1\ulc0\sb240\sa60\outlinelevel6 Heading 7;}{\s18\f3\fs24\i\cf0\cb1\ulc0\sb240\sa60\outlinelevel7 Heading 8;}{\s19\f1\fs22\cf3\cb1\ulc0\sb240\sa60\outlinelevel8 Heading 9;}{\s20\f1\fs32\b\cf0\cb1\ulc0\sb240\sa60\qc Title;}{\s21\f3\fs20\cf0\cb1\ulc0\fi-360\li360{\*\pn\pnlvlbody\pnstart1\pndec\ls0\ilvl0\pnhang
+{\pntxta \'2e}}\ls0\ilvl0 Numbered List;}{\s22\f3\fs20\cf0\cb1\ulc0\fi-360\li360{\*\pn\pnlvlblt\ls0\ilvl0\pnhang\pnf7{\pntxtb \'b7}}\ls0\ilvl0 Bulleted List;}{\s23\f3\fs20\cf0\cb1\ulc0\sa120 Body Text;}{\s24\f3\fs18\cf0\cb1\ulc0\sa120\sl480\slmult1 Body
+Text 2;}{\s25\f3\fs16\cf0\cb1\ulc0\sa120 Body Text 3;}{\s26\f3\fs20\cf0\cb1\ulc0 Note Heading;}{\s27\f10\fs20\cf0\cb1\ulc0 Plain Text;}{\s28\f3\fs20\b\cf0\cb1\ulc0 Strong;}{\s29\f3\fs20\i\cf0\cb1\ulc0 Emphasis;}{\s30\f3\fs20\ul\cf5\cb1\ulc0 Hyperlink;}{\s31\f3\fs20\cf0\cb1\ulc0\tx4320
+Footer;}{\s32\f3\fs20\cf0\cb1\ulc0\tx4320 Header;}{\s33\f10\fs18\cf0\cb1\ulc0 Code;}{\cs34\f3\fs20\i\cf3\cb1\ulc2 Field Label;}{\cs35\f3\fs22\b\cf0\cb1\ulc2 Table Heading;}{\cs36\f6\fs16\b\protect\cf0\cb4\ulc0 SSBookmark;}{\cs37\f3\fs20\b\ul\cf0\cb1\ulc0(
+Object type;}{\s38\f3\fs20\b\i\cf6\cb1\ulc0 List Header;}}
+{\*\listtable
+{\list\listtemplateid1
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'00.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List1;}\listid1
+}
+{\list\listtemplateid2
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\lerelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List2;}\listid2
+}
+{\list\listtemplateid3
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f9\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\nevelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List3;}\listid3
+}
+{\list\listtemplateid4
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f9\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List4;}\listid4
+}
+{\list\listtemplateid5
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List5;}\listid5
+}
+{\list\listtemplateid6
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List6;}\listid6
+}
+{\list\listtemplateid7
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'00.}{\levelnumbers \'01}\f5\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List7;}\listid7
+}
+{\list\listtemplateid8
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List8;}\listid8
+}
+{\list\listtemplateid9
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List9;}\listid9
+}
+{\list\listtemplateid10
+{\listlevel\levelîfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\meveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List10;}\listid10
+}
+{\list\listtemplateid11
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List11;}\listid11
+}
+{\list\listtemplateid12
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\Levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List12;}\listid12
+}
+}
+{\*\listoverridetable
+{\listoverride\listid12\listoverridecount0\ls1}
+}
+\paperw11908\paperh16833\margl1440\margr1440\margt1440\margb1440\headery720\footery720\deftab720\formshade\aendnotes\aftnnrlc\pgbrdrhead\pgbrdrfoot
+\sectd\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1440\margbsxn1440\headery720\footery720\sbkpage\pgncont\pgndec
+\plain\f1\cf0\fs20
+{\header
+\trowd\trgaph60\trleft0\trrh230
+\clvertalt\clbrdrb\brdrs\brdrw1\cellx3510
+\clvertalt\clbrdrb\brdrs\brdrw1\cellx5760
+\clvertalt\clbrdrb\brdrs\brdrw1\cellx9360
+\pard\intbl\s32\tx4320\ql\lang1033\f0 Model Specification\cell
+\pard\intbl\s32\tx4320\qc\lang1045\f1\lang1033\f0 Phase 01\cell
+\pard\intbl\s32\tx4320\qr\lang1045\f1\lang1033\f0 Page: {\field{\fldinst PAGE}{\fldrslt 1}}\cell
+\lang1045\f0\intbl\row
+\pard\s32\tx4320\qr\f1\f0\par\f1}
+{\footer\ql\f5\ulc0\par\f1\ulc2}
+\pard\s20\sb240\sa60\qc\l`ng1033\f5\fs32 Table of Contents\par\pard\s0\ql\lang1045\f1\fs20\f5\ulc0\par\pard\s5\tqr\tldot\tx9270\li540\ql\f1\ulc2{\field{\fldinst TOC \\o "1-9"}{\fldrslt\f3\ulc0\fs24 Infrastruktura sieciowa\lang1033\f0\tab 2\par\lang1045\f3
+Sieci LAN\lang1033\f0\tab 2\par\pard\s6\tqr\tldot\tx9270\li720\ql\lang1045\f3 201.0.0.0\f0\tab 2\par\f3 201.0.100.136/30 :sie\u263 \'e6 IP\f0\tab 2\par\f3 201.0.12.0\f0\tab 2\par\f3 201.0.16.0\f0\tab 2\par\f3 201.0.3.0\f0\tab 2\par\f3 201.0.6.0\f0\tab
+2\par\f3 ca 201.0.9.0/27\f0\tab 3\par\f3 cpfcpf 201.0.100.124/30\f0\tab 3\par\f3 DMZ 193.27.6.0\f0\tab 3\par\f3 flink 201.0.100.140/30\f0\tab 3\par\f3 Internet\f0\tab 3\par\f3 pixcpf 201.0.100.124/30\f0\tab 3\par\f3 prod 201.0.100.240/29\f0\tab 3\par\f3
+RA 201.0.9.32/27\f0\tab 3\par\\\\f3 RAO 201.0.9.96/27 :sie\u263 \'e6 IP\f0\tab 3\par\pard\s5\tqr\tldot\tx9270\li540\ql\f3 Urz\u261 \'b9dzenia\lang1033\f0\tab 4\par\pard\s6\tqr\tldot\tx9270\li720\ql\lang1045\f3 pix1\f0\tab 4\par\f3 pix21\f0\tab 4\par\f3 proxy1\f0\tab
+4\par\f3 proxy21\f0\tab 5\par\f3 sw1\f0\tab 5\par\f3 sw2\f0\tab 5\par\f3 sw21\f0\tab 5\par\f3 sw22\f0\tab 5\par\f3 sw23\f0\tab 5\par\f3 sw3\f0\tab 5\par\f3 wentyl1\f0\tab 5\par\f3 wentyl21\f0\tab 5\par\pard\s2\tqr\tldottx9270\ql}}\lang1033\f0\pard\s2\tqr\tldot\tx9270\ql\par\page\pard\s14\li720\sb240\sa60\ql\lang1045\f1{\*\bkmkstart
+Infrastruktura_sieciowa}{\*\bkmkstart BKM_82c14eb3_F991_4597_98f0_854dd833f496}\f3\cf3\ulc0\fs28\b Infrastruktura sieciowa{\field\fldlock{\*\fldinst
+MERGEFIELD \lang1033\f0 Pkg.Name}{\fldrslt}}\lang1033\f0\pard\s14\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\lang1045\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Pkg.Notes}{\fldrslt}}\cs36\lang1033\f8\highlight4\ulc0\fs16\b\protect\pard\s0\tqr\tx1170\li720\ql\par\pard\s0\li720\ql\cs1\lang1045\f1\highlight1\ulc2\fs20\b0\protect0\lang1045\f3\ulc0
+ \lang1045\f5\par\pard\s14\li720\sb240\sa60\ql\f1\ulc2{\*\bkmkstart Sieci_LAN}{\*\bkmkstart BKM_BDBBF25a_74dd_4037_B5e1_9d10c2183fbb}\f3\cf3\ulc0\fs28\b
+Sieci LAN{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Pkg.Name}{\fldrslt}}\lang1033\f0\pard\s14\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\lang1045\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Pkg.Notes}{\fldrslt}}\cs36\lang1033\f8\highlight4\ulc0\fs16\b\protect\pard\s0\tqr\tx1170\li720\ql\par
+{\*\bkmkstart BKM_523ada47_3e82_4089_ABEB_5b4b9b2a30c7}\cs1\lang1045\f5\highlight1\fs20\b0\protect0\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b 201.0.0.0{\field\fldlock{\*\fldinst
+MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 udost\lang1045\f3\u281 \'ea\lang1045\f3 pniana klientom Izby za po\lang1045\f3\u347 \'9c\lang1045\f3
+rednictwem sieci Exatel S.A.\lang1045\f5\par{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\f1\ulc2\pard\par
+\trowd\trgaph60\trleft64816\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIEND \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.0.0 255.255.255.255 1.0.0.11{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_523ada47_3e82_4089_ABEB_5b4b9b2a30c7}\lang1045\f3\ulc0 {\*\bkmkstart BKM_BFCA7b27_252f_4611_9ad1_4049708dd34a}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+201.0.100.136/30 :sie\u263 \'e6 IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes
+{\*\bkmkend BKM_BFCA7b27_252f_4611_9ad1_4049708dd34a}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_BB3e912_D587_439e_AAB8_4ea7a3473176}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+201.0.12.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 udost\lang1045\f3\u281 \'ea\lang1045\f3 pniana klientom
+Izby za po\lang1045\f3\u347 \'9c\lang1045\f3 rednictwem sieci Exatel S.A.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.12.0 255.255.255.0 201.0.12.11{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_BB3e912_D587_439e_AAB8_4ea7a3473176}\lang1045\f3\ulc0 {\*\bkmkstart BKM_B99df3a2_6fcc_4716_953e_A4e4a7e0CFA0}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+201.0.16.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 og\lang1045\f3\u243 \'f3\lang1045\f3 lna Centrali
+KIR S.A.{\field\fldlock{\*\fldinst MERGEFIELD \l`ng1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3|u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.16.0 255.255.255.0 201.0.16.242{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_B99df3a2_6fcc_4716_953e_A4e4a7e0CFA0}\lang1045\f3\ulc0 {\*\bkmkstart BKM_BBB9F76C_07B9_4f8d_A567_D5772463993e}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+201.0.3.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 udost\lang1045\f3\u281 \'ea\lang1045\f3 pnia~a klientom
+Izby za po\lang1045\f3\u347 \'9c\lang1045\f3 rednictwem sieci Exatel S.A.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh27y
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.3.0 255.255.255.0 201.0.3.11{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_BBB9f76c_7b9_4f8d_A567_D5772463993e}\lang1045\f3\ulc0 {\*\bkmkstart BKM_1017804d_216c_4074_B461_668b2d44913d}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+201.0.6.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 og\lang1045\f3\u243 \'f3\lang1045\f3 lna Centrali
+KIR S.A.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.6.0 255.255.255.0 201.0.6.11{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_1017804d_216c_4074_B461_668b2d44913d}\lang1045\f3\ulc0 {\*\bkmkstart BKM_349b5ca7_58e4_4ac5_B66e_ea8b76eb9f9}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+ca 201.0.9.0/27{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 wysoce chroniona; w sieci znajduj\lang1045\f3\u261
+\'b9\lang1045\f3 si\lang1045\f3\u281 \'ea\lang1045\f3 tylko komputery urz\lang1045\f3\u281 \'ea\lang1045\f3 d\lang1045\f3\u243 \'f3\lang1045\f3 w certyfikacyjnych KIR S.A.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.9.0 255.255.255.224 201.0.9.30{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska, o\lang1045\f3\u347 \'9c\lang1045\f3
+rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_349b5ca7_58e4_4ac5_B66e_ea8b76eb9f9}\lang1045\f3\ulc0 {\*\bkmkstart BKM_D47641b5_A5d7_43da_9626_EB144f57febb}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+cpfcpf 201.0.100.124/30{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes
+{\*\bkmkend BKM_D47641b5_A5d7_43da_9626_EB144f57febb}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_8629b55b_E004_472b_B1f1_C683250e6b6}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+DMZ 193.27.6.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Strefa zdemilitaryzowana po\lang1045\f3\u322 \'b3\u261 \'b9\lang1045\f3 czenia z Internetem
+w KIR S.A.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 193.27.6.0 255.255.255.240 <brak>{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska, o\lang1045\f3\u347 \'9c\lang1045\f3
+rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_8629b55b_E004_472b_B1f1_C683250e6b6}\lang1045\f3\ulc0 {\*\bkmkstart BKM_9cf66f6c_07D5_46d4_B5E4_6785020AE1C6}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+flink 201.0.100.140/30{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes
+{\*\bkmkend BKM_9cf66f6c_07D5_46d4_B5E4_6785020AE1C6}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_FD91271_8e42_4e74_9361_F87b02c663c3}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+Internet{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Globalna sie\lang1045\f3\u263 \'e6\lang1045\f3 Internet.{\field\fldlock{\*\fldinst
+MERGEFIELD \lang1033\f0 Element.Notes{\*\bkmkend BKM_FD91271_8e42_4e74_9361_F87b02c663c3}}{\fldrslt}} {\*\bkmkstart BKM_C1cc1d21_3f5_4062_9545_5a3bf082e743}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+pixcpf 201.0.100.124/30{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes
+{\*\bkmkend BKM_C1cc1d21_3f5_4062_9545_5a3bf082e743}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_A6e8d12d_BA01_4208_8187_877d3dad86c6}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc\fs26\b
+prod 201.0.100.240/29{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes
+{\*\bkmkend BKM_A6e8d12d_BA01_4208_8187_877d3dad86c6}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_F283df07_BB20_4f67_B119_E116b34353ff}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+RA 201.0.9.32/27{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 chroniona; w sieci znajduj\lang1045\f3\u261
+\'b9\lang1045\f3 si\lang1045\f3\u281 \'ea\lang1045\f3 tylko komputery zwi\lang1045\f3\u261 \'b9\lang1045\f3 zane z prac\lang1045\f3\u261 \'b9\lang1045\f3 OZK2.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.19.32 255.255.255.224 201.0.19.62{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska, o\lang1045\f3\u347 \'9c\lang1045\f3
+rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_F283df07_BB20_4f67_B119_E116b34353ff}\lang1045\f3\ulc0 {\*\bkmkstart BKM_6758daa6_A44a_44c2_86bc_211566e94ec1}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+RAO 201.0.9.96/27 :sie\u263 \'e6 IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 chroniona; w sieci znajduj\lang1045\f3\u261
+\'b9\lang1045\f3 si\lang1045\f3\u281 \'ea\lang1045\f3 tylko komputery zwi\lang1045\f3\u261 \'b9\lang1045\f3 zane z prac\lang1045\f3\u261 \'b9\lang1045\f3 OZK2.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.19.96 255.255.255.224 201.0.19.97{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska, o\lang1045\f3\u347 \'9c\lang1045\f3
+rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\li720\ql\f1\ulc2{\*\bkmkend BKM_6758daa6_A44a_44c2_86bc_211566e94ec1}\lang1045\f3\ulc0 {\*\bkmkend Sieci_LAN}{\*\bkmkend
+BKM_BDBBF25a_74dd_4037_B5e1_9d10c2183fbb} \lang1045\f5\par\pard\s14\li720\sb240\sa60\ql\f1\ulc2{\*\bkmkstart Urz\'b9dzenia_START}{\*\bkmkend Urz\'b9dzenia_START}{\*\bkmkstart BKM_93cd549d_E008@6b9_A645_67A5728BC591}\f3\cf3\ulc0\fs28\b
+Urz\u261 \'b9dzenia{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Pkg.Name}{\fldrslt}}\lang1033\f0\pard\s14\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\lang1045\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Pkg.Notes}{\fldrslt}}\cs36\lang1033\f8\highlight4\ulc0\fs16\b\protect\pard\s0\tqr\tx1170\li720\ql\par
+{\*\bkmkstart BKM_3055a811_30d5_486b_962e_23fb98ebf4bd}\cs1\lang1045\f5\highlight1\fs20\b0\protect0\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b pix1{\field\fldlock{\*\fldinst
+MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intb\ow
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.9.33 255.255.255.240 201.0.9.33{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Marka{\field\fldlock{\*\fldinst MERGEFiELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Cisco{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Model{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 PIX Firewall 520{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFKELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_3055a811_30d5_486b_962e_23fb98ebf4bd}\lang1045\f3\ulc0 {\*\bkmkstart BKM_B7c6185c_3ffd_48b2_AABE_F7bed626b651}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+pix21{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.19.33 255.255.255.240 201.0.19.33{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Marka{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Cisco{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldr3lt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Model{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 PIX Firewall 520{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_B7c6185c_3ffd_48b2_AABE_F7bed626b651}\lang1045\f3\ulc0 {\*\bkmkstart BKM_8049279d_3b4e_4648_BC55_81ae4d9cc171}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+proxy1{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cmllx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5]ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.3.199 255.255.255.0 <brak>{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.20.2 255.255.255.240 <brak>{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 195.136.33.65 255.255.255.240 195.136.33.66{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Marka{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Dell{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Model{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Optiplex GX1{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Nr ewidencyjny{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 CE/002100{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Nr seryjny{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 JSI5T{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 OS{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Microsoft Windows NT 4.0 Server{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_8049279d_3b4e_4648_BC55_81ae4d9cc171}\lang1045\f3\ulc0 {\*\bkmkstart BKM_F69e29d6_602b_4695_85e9_6ed3166ca13a}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+proxy21{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvestalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.16.199 255.255.255.0 <brak>{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.20.2 255.255.255.240 <brak>{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.NAme}{\fldrslt}}\lang1045\f5 = \lang1045\f3 195.136.33.65 255.255.255.240 196.136.33.66{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Marka{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Dell{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Model{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 PowerEdge 2300{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 OS{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVaV.Name}{Ffldrslt}}\langElemewtTagVal.Name}{\fldrslt}}\langElementTagVal.Nam°}{\fldrslt}}\langElemenJTBgVal.Name}{\flgrslt}}\langElementTagVal.Name}{\fldrslt}}\lamgElementTagVal.Name}{\fldrslt}}\laÏgElemantTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{wfldrslt}}\langElementTrgVal.Name}{\flyrslt}}\langElemenVTazVal.Name}{\fldrslte}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{mfldrslt}}\langElementTagVal.Name}{\fldrslt}}ClangElementTagValbName}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElemXntTagVil.Name}{\fldrsNt}}\langElemNntTagVag.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\dangElementTagVal.Name}{\fldrslt}}\JangElementTagVal.Name}{\fldrsltD}\langEl˜mentbagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\laogElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.NamS}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langXlementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslk}}\langElemeNtTagVal.eame}{\fldrslt}}\langElementTagVal.Name}{\flJrslt}}\langElementTacVal.Name}{\fldrslt}}ZlangElementTagVal.NaIe}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\l
+ngElementTvgVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTaggal.Name}{\ilerslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.NamI}{\fldrsSt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Nameq{\fldrslt}}\lavgElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\flmrslt}}\langElementTagVal.Name}{\fldrsit}}\langElementTagVal.NQme}{\Lldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrswt}}\langElementGagial.Name}{\flduslt}}\langElementTagVal.Name}{\fldrsBt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrJlt}}\langElementTagVal.Nace}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.NaPe}{\fldrslt}}\langElementTagVal.Name}{\fldrsltx}\langElsmentTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fUdrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagnal.Namk}{\fldrslt}}nlangElementTagValgName}{\fldrslt}}\langElementTagVal.Name}{\fçdrslt}}\langElementTagVal.Name}{\fbdrslt}}\langElempntTagVal.Name}{\fldrslt}}\langElemenæTagVBl.Name}{\fldrslt}}\DangElementTaYVal.Name}{\fldrslt}}\langElementTagVaR.NamN}{\fldzslt}}\langElementTagVal.Name}{\fldrslt}}\langElementkagVal.Name}{\pldrslt}}\langElementTagValTName}{\fldrslt}}WlangElementTfgVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fSdrslt}}\lanaElementTagVAl.Name}{\fldrsLt}}\langElemeZtTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElrmentTagVal.Name}{\fldrslt}}VlangElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\gangElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\Cldrhlt}}\langlementTagVal.Name}{\fldrslt}}\langEleQentTagVal.Name}{\eldrsSt}}\SangElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVaj.Name}{xfldrslt}}\sangElementTagVal.Name}{\fldrslt}}\langPlementTagVal.Name}{\oldrsXt}}\langElementTVgVal.NameL{\Sldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\lanjElementTagVal.Name}{\fldrsWt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagQal.Name}{\fldrsl³}}\langElementTagxal.Name}{\fldrslt}}\lqngElementTagVal.Name}{\fldrslt}}\langElementdagVal.Name}{\fldrslt}}\langElementTagVal.NBme}{\fldrslt}}\langElezentTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElemfnWTagVal.Name}{Pfldr¬lt}}\langElWmentTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElemenWTagVal.Name}{\fldrslt}h\langElemenFTagVal.Name}{\fldrslt}}\lanCElehentTagVal.Name}{\fldLslt}}wlangflementTagVal.Name}{\fldrslt}}\langglementTagVal.NameU{\fldrsli}}\langElementTagVal.Name}{\fldrslt}}\FangElementTagVal.Name}{\fldrslt}}\PangElementTagVal.NîBE}{\fldrslt}}\langEleFentTagVal.Name}{\fldrslt}}\langE|ementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrsltI}\laAgElementTagVal.Name}{\fldrslt}}\langElemeJtTagVal.Ntme}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langEleme§tTagVal.Name}l\fldrslG}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\lan¸ElementTagVal.Name}{\fldrslt}}\langEgementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\flVrsl}}\langElementTagVal.Name}{\fldrslt}}\lan}ElLmentTagVal.Name}{\fldrslt}}\langElementTRgVal.lame}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langclementTagVMl.Name}{\fldrslt}}wnangElemenfTagVal.Name}u\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagKal.Name}{\fldrslt}}\langElHmentTagVal.Name}P\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}D\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Namei{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVPlTName}{\fldrGlt}}\langElementTagLaj.Name}{lfldrslt}}\langElementTagVaG.Name}{\fldrslt}}\langElementTagValyName}{\fldrslt}}\langElementTHgVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langEvementTagVal.zame}{\fldrslM}}\langElementTagVrl.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrs|t}}\langElementTagVal.Name}{\fldrslt}}\langllementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fXdrslt}}\langElementuagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVaj.Name}{\fldrslt}}\langElementTagVal.Name}{\uldrslt}}\langEleoentTagVal.Name}{\fldrslt}}\langElemennTagVal.Name}{\fldrslX}}\langElementTagVal.Name}{\fldrslt}}\langklementTagVal.Name}{\fldrslt}}\langElementTagVau.Name}{\fldrslt}}\langElemenvTagVal.NFme}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\flkrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTcgVal.Name}{\fldrslt}}\langElementT’gVal.NamR}{\fldrGlt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldsslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrsqt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElžmentTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\FangElementTagVal.dame}{\fldrslt}}\lxngElmmentTagVal.Name}{\fldrslt}}\langSlementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.NaGe}{\fldrslt}}\langElementTagVal.Name}{\Aldrslt}}\langElementTagVal.Name}{\fldrslt}}\lanfElementTagValCName}{\fldrClt}}\langElementTagVal.wame}{\fldrslt}}\langElementTagVaC.Name}{\fldrslE}}\LangEhementTagVal.Name}{\fldrslt}}\langElemestTagVal.NameP{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langFlementTaDVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langEwementTagVal.NaWe}{\fldrslt}}\langElementTagVal.Nam
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_F69e29d6_602b_4695_85e9_6ed3166ca13a}\lang1045\f3\ulc0 {\*\bkmkstart BKM_a8055c7_EBB6_4188_A92d_50dcf1d29199}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw1{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_a8055c7_EBB6_4188_A92d_50dcf1d29199}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_4654fa92_A2c8_477e_90be_6f16df43be1f}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw2{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_4654fa92_A2c8_477e_90be_6f16df43be1f}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_9e2c21bb_F88f_4cfd_ABEF_B8df014d58e3}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw21{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_9e2c21bb_F88f_4cfd_ABEF_B8df014d58e3}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw22{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_40e8b33f_4908@6df_9279_88BF5015431A}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw23{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.0.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Datafield{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 test{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_40e8b33f_4908@6df_9279_88BF5015431A}\lang1045\f3\ulc0 {\*\bkmkstart BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw3{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_e8b97b9_3737_445d_A1ee_2cff79632be6}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+wentyl1{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_e8b97b9_3737_445d_A1ee_2cff79632be6}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_42c710ad_C753_4955_8883_26bf28d68159}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+wentyl21{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_42c710ad_C753_4955_8883_26bf28d68159}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart Urz\'b9dzenia_END}{\*\bkmkend Urz\'b9dzenia_END}{\*\bkmkend BKM_93cd549d_E008@6b9_A645_67A5728BC591}
+{\*\bkmkend Infrastruktura_sieciowa}{\*\bkmkend BKM_82c14eb3_F991_4597_98f0_854dd833f496} \lang1045\f5\li720\ql\par\li0\f1\ulc2\f5\ulc0\par}
+t BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81_START}{\*\bkmkend BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81_START}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw22{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkstart BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81_END}{\*\bkmkend
+BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81_END}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_40e8b33f_4908@6df_9279_88BF5015431A_START}{\*\bkmkend BKM_40E8B33F_4908@6df_9279_88BF5015431A_START}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw23{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.0.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Datafield{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 test{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkstart BKM_40e8b33f_4908@6df_9279_88BF5015431A_END}{\*\bkmkend BKM_40E8B33F_4909_46df_9279_88bf5015431a_END}\lang1045\f3\ulc0 {\*\bkmkstart BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43_START}{\*\bkmkend BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43_START}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw3{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkstart BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43_END}{\*\bkmkend
+BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43_END}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_e8b97b9_3737_445d_A1ee_2cff79632be6_START}{\*\bkmkend BKM_e8b97b9_3737_445d_A1ee_2cff79632be6_START}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+wentyl1{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkstart BKM_e8b97b9_3737_445d_A1ee_2cff79632be6_END}{\*\bkmkend
+BKM_e8b97b9_3737_445d_A1ee_2cff79632be6_END}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_42c710ad_C753_4955_8883_26bf28d68159_START}{\*\bkmkend BKM_42c710ad_C753_4955_8883_26bf28d68159_START}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+wentyl21{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkstart BKM_42c710ad_C753_4955_8883_26bf28d68159_END}{\*\bkmkend
+BKM_42c710ad_C753_4955_8883_26bf28d68159_END}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart Urz\'b9dzenia_END}{\*\bkmkend Urz\'b9dzenia_END}{\*\bkmkstart BKM_93cd549d_E008@6b9_A645_67A5728BC591_END}{\*\bkmkend BKM_93CD549D_E009_46b9_A645_67a5728bc591_END}{\*\bkmkstart
+Infrastruktura_sieciowa_END}{\*\bkmkend Infrastruktura_sieciowa_END}{\*\bkmkstart BKM_82c14eb3_F991_4597_98f0_854dd833f496_END}{\*\bkmkend BKM_82c14eb3_F991_4597_98f0_854DD18446744073709551615F496_END} \lang1045\f5\li720\ql\par\li0\f1\ulc2\f5\ulc0\par} \ No newline at end of file
diff --git a/sw/qa/core/data/rtf/pass/forcepoint110.rtf b/sw/qa/core/data/rtf/pass/forcepoint110.rtf
new file mode 100644
index 000000000000..b7594ff6b622
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/forcepoint110.rtf
Binary files differ
diff --git a/sw/qa/core/data/ww5/pass/ooo37322-1-WW2.doc b/sw/qa/core/data/ww5/pass/ooo37322-1-WW2.doc
new file mode 100644
index 000000000000..fd64eeed2963
--- /dev/null
+++ b/sw/qa/core/data/ww5/pass/ooo37322-1-WW2.doc
Binary files differ
diff --git a/sw/qa/core/data/ww6/fail/ofz45140-1.doc b/sw/qa/core/data/ww6/fail/ofz45140-1.doc
new file mode 100644
index 000000000000..59538b13e450
--- /dev/null
+++ b/sw/qa/core/data/ww6/fail/ofz45140-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww6/pass/ofz34898-1.doc b/sw/qa/core/data/ww6/pass/ofz34898-1.doc
new file mode 100644
index 000000000000..544dd0d55896
--- /dev/null
+++ b/sw/qa/core/data/ww6/pass/ofz34898-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww6/pass/ofz41398-1.doc b/sw/qa/core/data/ww6/pass/ofz41398-1.doc
new file mode 100644
index 000000000000..34c6e357d82a
--- /dev/null
+++ b/sw/qa/core/data/ww6/pass/ofz41398-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww6/pass/ofz42330-1.doc b/sw/qa/core/data/ww6/pass/ofz42330-1.doc
new file mode 100644
index 000000000000..a1cd04f53d67
--- /dev/null
+++ b/sw/qa/core/data/ww6/pass/ofz42330-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/ofz34749-1.doc b/sw/qa/core/data/ww8/pass/ofz34749-1.doc
new file mode 100644
index 000000000000..d657a71b5245
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/ofz34749-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/ofz38011-1.doc b/sw/qa/core/data/ww8/pass/ofz38011-1.doc
new file mode 100644
index 000000000000..8ef58ca5395d
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/ofz38011-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/ofz46457-1.doc b/sw/qa/core/data/ww8/pass/ofz46457-1.doc
new file mode 100644
index 000000000000..c986678b5b17
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/ofz46457-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/ofz47205-1.doc b/sw/qa/core/data/ww8/pass/ofz47205-1.doc
new file mode 100644
index 000000000000..acbb4830d553
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/ofz47205-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/ofz53457-1.doc b/sw/qa/core/data/ww8/pass/ofz53457-1.doc
new file mode 100644
index 000000000000..b847eedbbdef
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/ofz53457-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/ofz57592-1.doc b/sw/qa/core/data/ww8/pass/ofz57592-1.doc
new file mode 100644
index 000000000000..289343a1afb7
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/ofz57592-1.doc
Binary files differ
diff --git a/sw/qa/core/doc/data/bookmark-delete-redline.doc b/sw/qa/core/doc/data/bookmark-delete-redline.doc
new file mode 100644
index 000000000000..7e46b0236b9b
--- /dev/null
+++ b/sw/qa/core/doc/data/bookmark-delete-redline.doc
Binary files differ
diff --git a/sw/qa/core/doc/data/copy-bookmarks.docx b/sw/qa/core/doc/data/copy-bookmarks.docx
new file mode 100644
index 000000000000..a9bedb487946
--- /dev/null
+++ b/sw/qa/core/doc/data/copy-bookmarks.docx
Binary files differ
diff --git a/sw/qa/core/doc/data/floating-table-dummy-text.docx b/sw/qa/core/doc/data/floating-table-dummy-text.docx
new file mode 100644
index 000000000000..14de5a920a88
--- /dev/null
+++ b/sw/qa/core/doc/data/floating-table-dummy-text.docx
Binary files differ
diff --git a/sw/qa/core/doc/data/header-footer-delete.docx b/sw/qa/core/doc/data/header-footer-delete.docx
new file mode 100644
index 000000000000..e6cc4273151d
--- /dev/null
+++ b/sw/qa/core/doc/data/header-footer-delete.docx
Binary files differ
diff --git a/sw/qa/core/doc/data/textbox-makeflyframe.docx b/sw/qa/core/doc/data/textbox-makeflyframe.docx
new file mode 100644
index 000000000000..9e26cda3c6a6
--- /dev/null
+++ b/sw/qa/core/doc/data/textbox-makeflyframe.docx
Binary files differ
diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx
index b1574321320d..b653a1cc2201 100644
--- a/sw/qa/core/doc/doc.cxx
+++ b/sw/qa/core/doc/doc.cxx
@@ -9,13 +9,19 @@
#include <swmodeltestbase.hxx>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+
#include <comphelper/classids.hxx>
#include <tools/globname.hxx>
#include <svtools/embedhlp.hxx>
+#include <editeng/acorrcfg.hxx>
#include <editeng/frmdiritem.hxx>
+#include <editeng/svxacorr.hxx>
#include <vcl/errinf.hxx>
#include <vcl/event.hxx>
#include <editeng/langitem.hxx>
+#include <vcl/scheduler.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <wrtsh.hxx>
#include <fmtanchr.hxx>
@@ -24,18 +30,33 @@
#include <edtwin.hxx>
#include <view.hxx>
#include <ndtxt.hxx>
-
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/doc/data/";
+#include <swdtflvr.hxx>
+#include <unotxdoc.hxx>
+#include <UndoManager.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <frmmgr.hxx>
+#include <formatflysplit.hxx>
+#include <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+#include <pagefrm.hxx>
+#include <sortedobjs.hxx>
+#include <itabenum.hxx>
/// Covers sw/source/core/doc/ fixes.
class SwCoreDocTest : public SwModelTestBase
{
+public:
+ SwCoreDocTest()
+ : SwModelTestBase("/sw/qa/core/doc/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testMathInsertAnchorType)
{
// Given an empty document.
- SwDoc* pDoc = createSwDoc();
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
// When inserting an a math object.
SwWrtShell* pShell = pDoc->GetDocShell()->GetWrtShell();
@@ -43,7 +64,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testMathInsertAnchorType)
pShell->InsertObject(svt::EmbeddedObjectRef(), &aGlobalName);
// Then the anchor type should be as-char.
- SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+ sw::SpzFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rFormats.size());
const SwFrameFormat& rFormat = *rFormats[0];
const SwFormatAnchor& rAnchor = rFormat.GetAnchor();
@@ -58,11 +79,12 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testMathInsertAnchorType)
CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextboxTextRotateAngle)
{
// Check the writing direction of the only TextFrame in the document.
- SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "textbox-textrotateangle.odt");
- SwFrameFormats& rFrameFormats = *pDoc->GetSpzFrameFormats();
+ createSwDoc("textbox-textrotateangle.odt");
+ SwDoc* pDoc = getSwDoc();
+ sw::SpzFrameFormats& rFrameFormats = *pDoc->GetSpzFrameFormats();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rFrameFormats.size());
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(RES_DRAWFRMFMT), rFrameFormats[0]->Which());
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(RES_FLYFRMFMT), rFrameFormats[1]->Which());
+ CPPUNIT_ASSERT_EQUAL(o3tl::narrowing<sal_uInt16>(RES_DRAWFRMFMT), rFrameFormats[0]->Which());
+ CPPUNIT_ASSERT_EQUAL(o3tl::narrowing<sal_uInt16>(RES_FLYFRMFMT), rFrameFormats[1]->Which());
SvxFrameDirection eActual = rFrameFormats[1]->GetAttrSet().GetItem(RES_FRAMEDIR)->GetValue();
// Without the accompanying fix in place, this test would have failed with:
@@ -76,14 +98,15 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextboxTextRotateAngle)
CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testNumDownIndent)
{
- SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "num-down-indent.docx");
+ createSwDoc("num-down-indent.docx");
+ SwDoc* pDoc = getSwDoc();
SwDocShell* pDocShell = pDoc->GetDocShell();
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
pWrtShell->Down(/*bSelect=*/false);
SwEditWin& rEditWin = pDocShell->GetView()->GetEditWin();
KeyEvent aKeyEvent(0, KEY_TAB);
rEditWin.KeyInput(aKeyEvent);
- SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode();
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
// Without the accompanying fix in place, this test would have failed with:
// - Expected: \tB
@@ -93,12 +116,62 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testNumDownIndent)
ErrorRegistry::Reset();
}
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testBulletsOnSpaceOff)
+{
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
+ pAutoCorrect->GetSwFlags().bSetNumRule = false;
+ pAutoCorrect->GetSwFlags().bSetNumRuleAfterSpace = false;
+
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ SwEditWin& rEditWin = pDocShell->GetView()->GetEditWin();
+ KeyEvent aKeyEvent('-', 0);
+ rEditWin.KeyInput(aKeyEvent);
+ KeyEvent aKeyEvent2(' ', KEY_SPACE);
+ rEditWin.KeyInput(aKeyEvent2);
+ KeyEvent aKeyEvent3('a', 0);
+ rEditWin.KeyInput(aKeyEvent3);
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("- a"), pTextNode->GetText());
+ ErrorRegistry::Reset();
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testBulletsOnSpace)
+{
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
+ pAutoCorrect->GetSwFlags().bSetNumRule = true;
+ pAutoCorrect->GetSwFlags().bSetNumRuleAfterSpace = true;
+
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ SwEditWin& rEditWin = pDocShell->GetView()->GetEditWin();
+ KeyEvent aKeyEvent('-', 0);
+ rEditWin.KeyInput(aKeyEvent);
+ KeyEvent aKeyEvent2(' ', KEY_SPACE);
+ rEditWin.KeyInput(aKeyEvent2);
+ KeyEvent aKeyEvent3('a', 0);
+ rEditWin.KeyInput(aKeyEvent3);
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+
+ // '- ' was converted into bullet
+ CPPUNIT_ASSERT_EQUAL(OUString("a"), pTextNode->GetText());
+ ErrorRegistry::Reset();
+}
+
CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testLocaleIndependentTemplate)
{
- SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "locale-independent-template.odt");
+ createSwDoc("locale-independent-template.odt");
+ SwDoc* pDoc = getSwDoc();
SwDocShell* pDocShell = pDoc->GetDocShell();
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
- SfxItemSet aSet(pWrtShell->GetAttrPool(), { { RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE } });
+ SfxItemSet aSet(pWrtShell->GetAttrPool(), svl::Items<RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE>);
pWrtShell->GetCurAttr(aSet);
const SvxLanguageItem* pItem = aSet.GetItem(RES_CHRATR_LANGUAGE);
CPPUNIT_ASSERT(pItem);
@@ -115,10 +188,11 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testLocaleIndependentTemplate)
CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxZOrder)
{
- SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "textbox-zorder.docx");
- SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+ createSwDoc("textbox-zorder.docx");
+ SwDoc* pDoc = getSwDoc();
+ sw::SpzFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), rFormats.size());
- const SwFrameFormat* pEllipse = rFormats[2];
+ const sw::SpzFrameFormat* pEllipse = rFormats[2];
const SdrObject* pEllipseShape = pEllipse->FindRealSdrObject();
// Make sure we test the right shape.
CPPUNIT_ASSERT_EQUAL(OUString("Shape3"), pEllipseShape->GetName());
@@ -129,6 +203,412 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxZOrder)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(2), pEllipseShape->GetOrdNum());
}
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxMakeFlyFrame)
+{
+ // Given a document with an as-char textbox (as-char draw format + at-char fly format):
+ createSwDoc("textbox-makeflyframe.docx");
+ SwDoc* pDoc = getSwDoc();
+
+ // When cutting the textbox and pasting it to a new document:
+ selectShape(1);
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+ TransferableDataHelper aHelper(pTransfer);
+ uno::Reference<lang::XComponent> xDoc2
+ = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument", {});
+ SwXTextDocument* pTextDoc2 = dynamic_cast<SwXTextDocument*>(xDoc2.get());
+ SwDocShell* pDocShell2 = pTextDoc2->GetDocShell();
+ SwWrtShell* pWrtShell2 = pDocShell2->GetWrtShell();
+ SwTransferable::Paste(*pWrtShell2, aHelper);
+
+ // Then make sure its fly frame is created.
+ mxComponent->dispose();
+ mxComponent = xDoc2;
+ xmlDocUniquePtr pLayout = parseLayoutDump();
+ // Without the accompanying fix in place, this test would have failed, because the first text
+ // frame in the body frame had an SwAnchoredDrawObject anchored to it, but not a fly frame, so
+ // a blank square was painted, not the image.
+ assertXPath(pLayout, "/root/page/body/txt/anchored/fly"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testIMEGrouping)
+{
+// TODO figure out why the ext text input in this test code reaches the wrong window on
+// non-headless.
+#if !defined MACOSX && !defined _WIN32
+ // Given an empty document:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ // Make sure no idle is in action, so the ExtTextInput events go to SwEditWin.
+ Scheduler::ProcessEventsToIdle();
+
+ // When pressing two keys via IME:
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwEditWin& rEditWin = pDocShell->GetView()->GetEditWin();
+ rEditWin.PostExtTextInputEvent(VclEventId::ExtTextInput, "a");
+ rEditWin.PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+ rEditWin.PostExtTextInputEvent(VclEventId::ExtTextInput, "b");
+ rEditWin.PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+
+ // Then make sure that gets grouped together to a single undo action:
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("ab"), pTextNode->GetText());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. 2 subsequent IME events got their own undo actions.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetUndoManager().GetUndoActionCount());
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testImageHyperlinkStyle)
+{
+ // Given a document with an image with a hyperlink:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ uno::Reference<text::XTextContent> xImage(
+ xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xImage, /*bAbsorb=*/false);
+ uno::Reference<beans::XPropertySet> xImageProps(xImage, uno::UNO_QUERY);
+ OUString aExpected = "http://www.example.com";
+ xImageProps->setPropertyValue("HyperLinkURL", uno::Any(aExpected));
+
+ // When applying a frame style on it:
+ xImageProps->setPropertyValue("FrameStyleName", uno::Any(OUString("Frame")));
+
+ // Then make sure that the hyperlink is not lost:
+ auto aActual = getProperty<OUString>(xImageProps, "HyperLinkURL");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: http://www.example.com
+ // - Actual :
+ // i.e. the link was lost, even if the frame style dialog doesn't allow specifying a link on
+ // frames.
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testContentControlDelete)
+{
+ // Given a document with a content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // When deleting the dummy character at the end of the content control:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->DelLeft();
+
+ // Then make sure that we only enter the content control, to be consistent with the start dummy
+ // character:
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetMark()->GetNode().GetTextNode();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: ^Atest^A
+ // - Actual : ^Atest
+ // i.e. the end dummy character got deleted, but not the first one, which is inconsistent.
+ CPPUNIT_ASSERT_EQUAL(OUString("\x0001test\x0001"), pTextNode->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testCopyBookmarks)
+{
+ // Given a document with a bookmark in a header that is linked later:
+ createSwDoc("copy-bookmarks.docx");
+ SwDoc* pDoc = getSwDoc();
+
+ // When checking the # of non-copy bookmarks in the resulting doc model:
+ sal_Int32 nActual = 0;
+ for (auto it = pDoc->getIDocumentMarkAccess()->getBookmarksBegin();
+ it != pDoc->getIDocumentMarkAccess()->getBookmarksEnd(); ++it)
+ {
+ if ((*it)->GetName().indexOf("Copy") == -1)
+ {
+ ++nActual;
+ }
+ }
+
+ // Then make sure we have a single non-copy bookmark, with no duplications:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. the 2nd header had a duplicated bookmark without "Copy" in its name.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nActual);
+
+ // Also, when checking the # of non-copy images in the resulting doc model:
+ nActual = 0;
+ for (auto pSpz : *pDoc->GetSpzFrameFormats())
+ {
+ if (pSpz->GetName().indexOf("Copy") == -1)
+ {
+ ++nActual;
+ }
+ }
+
+ // Then make sure we have a single non-copy image, with no duplications:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. the 2nd header had a duplicated image without "Copy" in its name.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testLinkedStyleDelete)
+{
+ // Given a document with linked styles: myparastyle is linked to mycharstyle and vica versa:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xParaStyle(
+ xFactory->createInstance("com.sun.star.style.ParagraphStyle"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xCharStyle(
+ xFactory->createInstance("com.sun.star.style.CharacterStyle"), uno::UNO_QUERY);
+ uno::Reference<container::XNameContainer> xParaStyles(getStyles("ParagraphStyles"),
+ uno::UNO_QUERY);
+ xParaStyles->insertByName("myparastyle", uno::Any(xParaStyle));
+ uno::Reference<container::XNameContainer> xCharStyles(getStyles("CharacterStyles"),
+ uno::UNO_QUERY);
+ xCharStyles->insertByName("mycharstyle", uno::Any(xCharStyle));
+ xParaStyle->setPropertyValue("LinkStyle", uno::Any(OUString("mycharstyle")));
+ xCharStyle->setPropertyValue("LinkStyle", uno::Any(OUString("myparastyle")));
+
+ // When deleting the paragraph style (and only that):
+ xParaStyles->removeByName("myparastyle");
+
+ // Then make sure we don't crash on save:
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aArgs = {
+ comphelper::makePropertyValue("FilterName", OUString("writer8")),
+ };
+ xStorable->storeAsURL(maTempFile.GetURL(), aArgs);
+}
+
+namespace
+{
+/// This selection listener calls getAnchor() on selection change, which creates UNO cursors and is
+/// invoked in the middle of a bookmark deletion.
+struct SelectionChangeListener : public cppu::WeakImplHelper<view::XSelectionChangeListener>
+{
+ uno::Reference<container::XNameAccess> m_xBookmarks;
+ std::vector<uno::Reference<text::XTextRange>> m_aAnchors;
+
+public:
+ SelectionChangeListener(const uno::Reference<container::XNameAccess>& xBookmarks);
+ // view::XSelectionChangeListener
+ void SAL_CALL selectionChanged(const lang::EventObject& rEvent) override;
+
+ // lang::XEventListener
+ void SAL_CALL disposing(const lang::EventObject& rSource) override;
+};
+}
+
+SelectionChangeListener::SelectionChangeListener(
+ const uno::Reference<container::XNameAccess>& xBookmarks)
+ : m_xBookmarks(xBookmarks)
+{
+}
+
+void SelectionChangeListener::selectionChanged(const lang::EventObject& /*rEvent*/)
+{
+ uno::Sequence<OUString> aElementNames = m_xBookmarks->getElementNames();
+ for (const auto& rName : aElementNames)
+ {
+ uno::Reference<text::XTextContent> xTextContent(m_xBookmarks->getByName(rName),
+ uno::UNO_QUERY);
+ m_aAnchors.push_back(xTextContent->getAnchor());
+ }
+}
+
+void SelectionChangeListener::disposing(const lang::EventObject& /*rSource*/) {}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testBookmarkDeleteListeners)
+{
+ // Given a document with 2 bookmarks:
+ createSwDoc();
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ {
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xBookmark(
+ xFactory->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xBookmarkNamed(xBookmark, uno::UNO_QUERY);
+ xBookmarkNamed->setName("mybookmark");
+ xText->insertTextContent(xCursor, xBookmark, /*bAbsorb=*/true);
+ }
+ {
+ xCursor->gotoEnd(/*bExpand=*/false);
+ xText->insertString(xCursor, "test2", /*bAbsorb=*/false);
+ xCursor->goLeft(4, /*bExpand=*/true);
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xBookmark(
+ xFactory->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xBookmarkNamed(xBookmark, uno::UNO_QUERY);
+ xBookmarkNamed->setName("mybookmark2");
+ xText->insertTextContent(xCursor, xBookmark, /*bAbsorb=*/true);
+ }
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xBookmarks = xBookmarksSupplier->getBookmarks();
+
+ // When registering a selection listener that creates uno marks:
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XSelectionSupplier> xController(xModel->getCurrentController(),
+ uno::UNO_QUERY);
+ xController->addSelectionChangeListener(new SelectionChangeListener(xBookmarks));
+
+ // Then make sure that deleting a bookmark doesn't crash:
+ uno::Reference<lang::XComponent> xBookmark(xBookmarks->getByName("mybookmark2"),
+ uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have crashed, an invalidated iterator
+ // was used with erase().
+ xBookmark->dispose();
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testBookmarkDeleteRedline)
+{
+ // Given a document with redlines, a mark (annotation mark) inside a redline:
+ createSwDoc("bookmark-delete-redline.doc");
+ SwDoc* pDoc = getSwDoc();
+
+ // When hiding deletions / showing only inserts, make sure we don't crash:
+ // Without the accompanying fix in place, this test would have crashed, equal_range() was used
+ // on an unsorted container.
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::ShowInsert);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testHeaderFooterDelete)
+{
+ // Given a document with bookmarks in header/footers:
+ // When importing that document:
+ // Then make sure that we don't crash:
+ // Without the accompanying fix in place, this test would have crashed, an invalidated iterator
+ // was used in sw::mark::MarkManager::deleteMarks().
+ createSwDoc("header-footer-delete.docx");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testSplitFlyChain)
+{
+ // Given a document with 2 fly frames, first is allowed to split, second is not:
+ createSwDoc();
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ RndStdIds eAnchor = RndStdIds::FLY_AT_PARA;
+ aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize());
+ SwDoc* pDoc = getSwDoc();
+ auto& rFlys = *pDoc->GetSpzFrameFormats();
+ {
+ pWrtShell->StartAllAction();
+ auto pFly = rFlys[0];
+ SwAttrSet aSet(pFly->GetAttrSet());
+ aSet.Put(SwFormatFlySplit(true));
+ pDoc->SetAttr(aSet, *pFly);
+ pWrtShell->EndAllAction();
+ }
+ pWrtShell->UnSelectFrame();
+ pWrtShell->SttEndDoc(/*bStart=*/false);
+ aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize());
+ auto pFly = rFlys[0];
+ auto pFly2 = rFlys[1];
+
+ // When checking if chaining is allowed:
+ SwChainRet eActual = pDoc->Chainable(*pFly, *pFly2);
+ // Then make sure the source is rejected if it is a split fly:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 5 (SwChainRet::SOURCE_CHAINED)
+ // - Actual : 0 (SwChainRet::OK)
+ // i.e. the UI allowed chaining for floating tables, which doesn't make sense.
+ CPPUNIT_ASSERT_EQUAL(SwChainRet::SOURCE_CHAINED, eActual);
+
+ // Also test the other way around, that should not be OK, either.
+ eActual = pDoc->Chainable(*pFly2, *pFly);
+ CPPUNIT_ASSERT_EQUAL(SwChainRet::IS_IN_CHAIN, eActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testSplitExpandGlossary)
+{
+ // Given a document with a split fly (2 pages) and a 'dt' at the end:
+ createSwDoc("floating-table-dummy-text.docx");
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+
+ // When expanding 'dt' to an actual dummy text:
+ dispatchCommand(mxComponent, ".uno:ExpandGlossary", {});
+
+ // Then make sure the 2 fly frames stay on the 2 pages:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. both parts of the split fly chain were on page 1.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testSplitFlyInsertUndo)
+{
+ // Given a document with an inline table, which is then turned into a floating one:
+ createSwDoc();
+ SwDoc* pDoc = getSwDocShell()->GetDoc();
+ sw::FrameFormats<sw::SpzFrameFormat*>& rFlyFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT(rFlyFormats.empty());
+ // Insert a table:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwInsertTableOptions aTableOptions(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(aTableOptions, /*nRows=*/2, /*nCols=*/1);
+ pWrtShell->MoveTable(GotoPrevTable, fnTableStart);
+ pWrtShell->GoPrevCell();
+ pWrtShell->Insert("A1");
+ pWrtShell->GoNextCell();
+ pWrtShell->Insert("A2");
+ // Select cell:
+ pWrtShell->SelAll();
+ // Select table:
+ pWrtShell->SelAll();
+ // Wrap the table in a text frame:
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ pWrtShell->StartAllAction();
+ aMgr.InsertFlyFrame(RndStdIds::FLY_AT_PARA, aMgr.GetPos(), aMgr.GetSize());
+ pWrtShell->EndAllAction();
+ CPPUNIT_ASSERT(!rFlyFormats.empty());
+
+ // When undoing the conversion to floating table:
+ pDoc->GetUndoManager().Undo();
+
+ // Then make sure we don't have a frame anymore:
+ // Without the accompanying fix in place, this test would have failed, there was no undo action
+ // to execute.
+ CPPUNIT_ASSERT(rFlyFormats.empty());
+
+ // And when redoing the conversion:
+ pDoc->GetUndoManager().Redo();
+
+ // Then make sure we again have a frame:
+ CPPUNIT_ASSERT(!rFlyFormats.empty());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/docnode/data/tdf150086.docx b/sw/qa/core/docnode/data/tdf150086.docx
new file mode 100644
index 000000000000..063e68df6857
--- /dev/null
+++ b/sw/qa/core/docnode/data/tdf150086.docx
Binary files differ
diff --git a/sw/qa/core/docnode/data/tdf156267.docx b/sw/qa/core/docnode/data/tdf156267.docx
new file mode 100644
index 000000000000..f782ed0c95c2
--- /dev/null
+++ b/sw/qa/core/docnode/data/tdf156267.docx
Binary files differ
diff --git a/sw/qa/core/docnode/docnode.cxx b/sw/qa/core/docnode/docnode.cxx
index bcda50c8de7a..9521c67b8ef7 100644
--- a/sw/qa/core/docnode/docnode.cxx
+++ b/sw/qa/core/docnode/docnode.cxx
@@ -10,25 +10,60 @@
#include <swmodeltestbase.hxx>
#include <IDocumentRedlineAccess.hxx>
+#include <redline.hxx>
#include <doc.hxx>
#include <docary.hxx>
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/docnode/data/";
-
/// Covers sw/source/core/docnode/ fixes.
class Test : public SwModelTestBase
{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/docnode/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(Test, testRedlineEndsBeforeToC)
{
// Load a document where a delete redline ends right before a ToC, then redlines are hidden at a
// layout level.
- SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "redline-ends-before-toc.docx");
+ createSwDoc("redline-ends-before-toc.docx");
+ SwDoc* pDoc = getSwDoc();
const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
// Without the accompanying fix in place, this test would have resulted in an assertion failure
// in InsertCnt_(), because the start of the section was hidden, but not its end.
CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), rTable.size());
+
+ // The redline contained the newline, too
+ CPPUNIT_ASSERT_EQUAL(OUString("<add-table-of-content>"), rTable[0]->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf150086)
+{
+ // Load a document where an insert redline ends right before a ToC
+ createSwDoc("tdf150086.docx");
+ SwDoc* pDoc = getSwDoc();
+ const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(8), rTable.size());
+
+ // This was "Conte" (stripped redline)
+ CPPUNIT_ASSERT_EQUAL(OUString("Content\n"), rTable[6]->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf156267)
+{
+ createSwDoc("tdf156267.docx");
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Copy", {});
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ // Without the fix in place, it would have crashed here
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/core/draw/data/sdt-textbox-header.docx b/sw/qa/core/draw/data/sdt-textbox-header.docx
new file mode 100644
index 000000000000..a8b2d9625fbe
--- /dev/null
+++ b/sw/qa/core/draw/data/sdt-textbox-header.docx
Binary files differ
diff --git a/sw/qa/core/draw/data/tdf107727_FrameBorder.odt b/sw/qa/core/draw/data/tdf107727_FrameBorder.odt
new file mode 100644
index 000000000000..6b7bc3a375fa
--- /dev/null
+++ b/sw/qa/core/draw/data/tdf107727_FrameBorder.odt
Binary files differ
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..3879a0642e3c 100644
--- a/sw/qa/core/draw/draw.cxx
+++ b/sw/qa/core/draw/draw.cxx
@@ -15,18 +15,27 @@
#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/";
+#include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
/// Covers sw/source/core/draw/ fixes.
class SwCoreDrawTest : public SwModelTestBase
{
+public:
+ SwCoreDrawTest()
+ : SwModelTestBase("/sw/qa/core/draw/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(SwCoreDrawTest, testTextboxDeleteAsChar)
{
// Load a document with an as-char shape in it that has a textbox and an image in it.
- SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "as-char-textbox.docx");
+ createSwDoc("as-char-textbox.docx");
+ SwDoc* pDoc = getSwDoc();
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
sal_Int32 nActual = pPage->GetObjCount();
@@ -46,6 +55,97 @@ 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
+ createSwDoc("textbox-undo-ordnum.docx");
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ const auto& 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_TEST_FIXTURE(SwCoreDrawTest, testTdf107727FrameBorder)
+{
+ // Load a document with a textframe without border, one with only left border
+ createSwDoc("tdf107727_FrameBorder.odt");
+
+ // Export to RTF and reload
+ saveAndReload("Rich Text Format");
+
+ // Get frame without border and inspect it.
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame0(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ auto aBorder = getProperty<table::BorderLine2>(xFrame0, "LeftBorder");
+ // fo:border="none" is not available via API, and aBorder.LineWidth has wrong value (why?).
+ sal_uInt32 nBorderWidth
+ = aBorder.OuterLineWidth + aBorder.InnerLineWidth + aBorder.LineDistance;
+ // Without patch it failed with Expected 0, Actual 26
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), nBorderWidth);
+
+ // Get frame with left border and inspect it.
+ uno::Reference<beans::XPropertySet> xFrame1(xIndexAccess->getByIndex(1), uno::UNO_QUERY);
+ aBorder = getProperty<table::BorderLine2>(xFrame1, "LeftBorder");
+ // Without patch it failed with Expected 127, Actual 26. Default border width was used.
+ nBorderWidth = aBorder.OuterLineWidth + aBorder.InnerLineWidth + aBorder.LineDistance;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(127), nBorderWidth);
+ // Without patch it failed with Expected Color: R:0 G:0 B:255 A:0, Actual Color: R:0 G:0 B:0 A:0.
+ // Default border color was used.
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, Color(ColorTransparency, aBorder.Color));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDrawTest, testSdtTextboxHeader)
+{
+ // Given a 2 page document, same header on both pages, content control in the header and
+ // shape+fly pair (textbox) anchored in the same header
+ // When loading that document, then make sure that layout doesn't fail with an assertion because
+ // the "master SdrObj should have the highest index" invariant doesn't hold:
+ createSwDoc("sdt-textbox-header.docx");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/edit/data/delete-sel-normalize.odt b/sw/qa/core/edit/data/delete-sel-normalize.odt
new file mode 100644
index 000000000000..d7113204ba80
--- /dev/null
+++ b/sw/qa/core/edit/data/delete-sel-normalize.odt
Binary files differ
diff --git a/sw/qa/core/edit/data/redline-hidden.fodt b/sw/qa/core/edit/data/redline-hidden.fodt
new file mode 100644
index 000000000000..10355e3ac485
--- /dev/null
+++ b/sw/qa/core/edit/data/redline-hidden.fodt
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 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" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">false</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:automatic-styles>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm"/>
+ </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>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct51730224" text:id="ct51730224">
+ <text:insertion>
+ <office:change-info>
+ <dc:creator>Creator</dc:creator>
+ <dc:date>2017-04-27T17:12:10</dc:date>
+ </office:change-info>
+ </text:insertion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p><text:change-start text:change-id="ct51730224"/>test<text:change-end text:change-id="ct51730224"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/edit/edit.cxx b/sw/qa/core/edit/edit.cxx
new file mode 100644
index 000000000000..fa8fefa910c1
--- /dev/null
+++ b/sw/qa/core/edit/edit.cxx
@@ -0,0 +1,86 @@
+/* -*- 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 <docsh.hxx>
+#include <view.hxx>
+#include <wrtsh.hxx>
+#include <unotxdoc.hxx>
+
+namespace
+{
+/// Covers sw/source/core/edit/ fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/edit/data/")
+ {
+ }
+};
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRedlineHidden)
+{
+ // Given a document with ShowRedlineChanges=false:
+ createSwDoc("redline-hidden.fodt");
+ SwDoc* pDoc = getSwDoc();
+
+ // When formatting a paragraph by setting the para adjust to center, then make sure setting the
+ // new item set on the paragraph doesn't crash:
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ SfxItemSet aSet(pView->GetPool(), svl::Items<RES_PARATR_ADJUST, RES_PARATR_ADJUST>);
+ SvxAdjustItem aItem(SvxAdjust::Center, RES_PARATR_ADJUST);
+ aSet.Put(aItem);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SetAttrSet(aSet, SetAttrMode::DEFAULT, nullptr, true);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testAutocorrect)
+{
+ // Given an empty document:
+ createSwDoc();
+
+ // When typing a string, which contains a "-", then make sure no memory corruption happens when
+ // it gets auto-corrected to "–":
+ auto pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ // Without the accompanying fix in place, this test would have failed with a
+ // heap-use-after-free:
+ emulateTyping(*pTextDoc, u"But not now - with ");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testDeleteSelNormalize)
+{
+ // Given a read-only document with a fillable form, the placeholder text is selected:
+ createSwDoc("delete-sel-normalize.odt");
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->GotoFormControl(/*bNext=*/true);
+
+ // When you press 'delete' to type some content instead:
+ pWrtShell->DelRight();
+
+ // Then make sure the position after the delete is correct:
+ SwPosition& rCursor = *pWrtShell->GetCursor()->GetPoint();
+ // The full text is "key <field start><field separator><field end>", so this marks the position
+ // after the field separator but before the field end.
+ sal_Int32 nExpectedCharPos = strlen("key **");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 6
+ // - Actual : 5
+ // so we started to type between the field start and the field separator, nothing was visible on
+ // the screen.
+ CPPUNIT_ASSERT_EQUAL(nExpectedCharPos, rCursor.nContent.GetIndex());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/sw/qa/core/fields/data/chapter_field_followedby.odt b/sw/qa/core/fields/data/chapter_field_followedby.odt
new file mode 100644
index 000000000000..b2086f2591b3
--- /dev/null
+++ b/sw/qa/core/fields/data/chapter_field_followedby.odt
Binary files differ
diff --git a/sw/qa/core/fields/data/styleref-flags.docx b/sw/qa/core/fields/data/styleref-flags.docx
new file mode 100644
index 000000000000..443624a575e0
--- /dev/null
+++ b/sw/qa/core/fields/data/styleref-flags.docx
Binary files differ
diff --git a/sw/qa/core/fields/data/styleref.odt b/sw/qa/core/fields/data/styleref.odt
new file mode 100644
index 000000000000..27af5aae1f06
--- /dev/null
+++ b/sw/qa/core/fields/data/styleref.odt
Binary files differ
diff --git a/sw/qa/core/fields/data/suppress-non-numerical.docx b/sw/qa/core/fields/data/suppress-non-numerical.docx
new file mode 100644
index 000000000000..439e048b9f93
--- /dev/null
+++ b/sw/qa/core/fields/data/suppress-non-numerical.docx
Binary files differ
diff --git a/sw/qa/core/fields/data/tdf143424.odt b/sw/qa/core/fields/data/tdf143424.odt
new file mode 100644
index 000000000000..d485267f12e4
--- /dev/null
+++ b/sw/qa/core/fields/data/tdf143424.odt
Binary files differ
diff --git a/sw/qa/core/fields/data/tdf86790.docx b/sw/qa/core/fields/data/tdf86790.docx
new file mode 100644
index 000000000000..a45c03f6b898
--- /dev/null
+++ b/sw/qa/core/fields/data/tdf86790.docx
Binary files differ
diff --git a/sw/qa/core/fields/fields.cxx b/sw/qa/core/fields/fields.cxx
new file mode 100644
index 000000000000..b783dc0cf3e9
--- /dev/null
+++ b/sw/qa/core/fields/fields.cxx
@@ -0,0 +1,484 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <com/sun/star/text/XParagraphCursor.hpp>
+#include <reffld.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <com/sun/star/text/ReferenceFieldPart.hpp>
+#include <com/sun/star/text/ReferenceFieldSource.hpp>
+#include <com/sun/star/text/XFootnote.hpp>
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#include <com/sun/star/text/XSimpleText.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.h>
+#include <cppunit/TestAssert.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <comphelper/propertyvalue.hxx>
+
+#include <authfld.hxx>
+#include <docsh.hxx>
+#include <rootfrm.hxx>
+#include <wrtsh.hxx>
+
+namespace
+{
+/// Covers sw/source/core/fields/ fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/fields/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testAuthorityTooltip)
+{
+ // Create a document with a bibliography reference in it.
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ 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::Any(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(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ SwPaM* pCursor = pWrtShell->GetCursor();
+ auto pField = dynamic_cast<SwAuthorityField*>(
+ SwCursorShell::GetFieldAtCursor(pCursor, /*bIncludeInputFieldAtStart=*/true));
+ CPPUNIT_ASSERT(pField);
+ const SwRootFrame* pLayout = pWrtShell->GetLayout();
+ OUString aTooltip = pField->GetAuthority(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_TEST_FIXTURE(Test, testTdf143424)
+{
+ createSwDoc("tdf143424.odt");
+
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(
+ xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // TODO: I have no idea why fields are enumerated in invalid order, not like in document
+
+ // Field: Chapter Format: Chapter name
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Another title"), xField->getPresentation(false));
+
+ // Field: Chapter Format: Chapter number and name
+ xField.set(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Chapter 2 - Another title"), xField->getPresentation(false));
+
+ // Field: Chapter Format: Chapter number
+ xField.set(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Chapter 2 -"), xField->getPresentation(false));
+
+ // Field: Chapter Format: Chapter number without separator
+ xField.set(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), xField->getPresentation(false));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testChapterFieldsFollowedBy)
+{
+ createSwDoc("chapter_field_followedby.odt");
+
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(
+ xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // TODO: I have no idea why fields are enumerated in invalid order, not like in document
+ std::vector<OUString> aFieldValues = {
+ "Followed by tab", // #1
+ "I.I.I.I", // #16
+ ">I.I.I.I< Followed by newline", // #15 Linefeed is replaced by space
+ ">I.I.I.I<", // #14
+ "Followed by newline", // #13
+ "I.I.I", // #12
+ ">I.I.I<Followed by nothing", // #11 Nothing between text & outline
+ ">I.I.I<", // #10
+ "Followed by nothing", // #9
+ "I.I", // #8
+ ">I.I< Followed by space", // #7 Space as is
+ ">I.I<", // #6
+ "Followed by space", // #5
+ "I", // #4
+ ">I< Followed by tab", // #3 Here is a tab, but replaced by space in field
+ ">I<", // #2
+ };
+
+ for (const auto& sValue : aFieldValues)
+ {
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sValue, xField->getPresentation(false));
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf86790)
+{
+ loadFromFile(u"tdf86790.docx");
+
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(
+ xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Similarly to testChapterFieldsFollowedBy, the fields are enumerated with #1 first and everything else in reverse order
+ std::vector<std::pair<OUString, OUString>> aFieldValues = {
+ { " Heading 1", "1" }, // #1
+ { " foobar", "22.2" }, // #5
+ { " foobar", "4" }, // #4
+ { " Heading 2", "1.1" }, // #3
+ { " Heading 2", "1.1" }, // #2
+ };
+
+ for (const auto& sValue : aFieldValues)
+ {
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sValue.first, xField->getPresentation(true));
+ CPPUNIT_ASSERT_EQUAL(sValue.second, xField->getPresentation(false));
+ }
+ CPPUNIT_ASSERT(!xFields->hasMoreElements());
+}
+
+void InsertParagraphBreak(const uno::Reference<text::XTextCursor>& xCursor)
+{
+ uno::Reference<text::XText> xText = xCursor->getText();
+ xText->insertControlCharacter(xCursor, text::ControlCharacter::PARAGRAPH_BREAK, false);
+}
+void InsertHeading(const uno::Reference<text::XTextCursor>& xCursor, const OUString& content)
+{
+ uno::Reference<beans::XPropertySet> xCursorPropertySet(xCursor, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xCursor->getText();
+
+ xCursorPropertySet->setPropertyValue("ParaStyleName", uno::Any(OUString("Heading 1")));
+ xText->insertString(xCursor, content, false);
+ InsertParagraphBreak(xCursor);
+}
+
+/// If there is referenced text both above and below, STYLEREF searches up
+CPPUNIT_TEST_FIXTURE(Test, testStyleRefSearchUp)
+{
+ // Arrange
+ // Create a document with headings both above and below a cursor
+ createSwDoc();
+
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+
+ InsertHeading(xCursor, "Heading far above field");
+ InsertHeading(xCursor, "Heading above field");
+ InsertParagraphBreak(xCursor);
+ InsertHeading(xCursor, "Heading below field");
+ InsertHeading(xCursor, "Heading far below field");
+
+ uno::Reference<text::XParagraphCursor> xParagraphCursor(xCursor, uno::UNO_QUERY);
+ xParagraphCursor->gotoPreviousParagraph(false); // Heading far below...
+ xParagraphCursor->gotoPreviousParagraph(false); // Heading below...
+ xParagraphCursor->gotoPreviousParagraph(false); // Blank space
+
+ // Act
+ // Insert a STYLEREF field which looks for "Heading 1"s
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextField> xField(
+ xFactory->createInstance("com.sun.star.text.TextField.GetReference"), uno::UNO_QUERY);
+
+ uno::Reference<beans::XPropertySet> xFieldPropertySet(xField, uno::UNO_QUERY);
+ xFieldPropertySet->setPropertyValue("ReferenceFieldSource",
+ uno::Any(sal_Int16(text::ReferenceFieldSource::STYLE)));
+ xFieldPropertySet->setPropertyValue("ReferenceFieldPart",
+ uno::Any(sal_Int16(text::ReferenceFieldPart::TEXT)));
+ xFieldPropertySet->setPropertyValue("SourceName", uno::Any(OUString("Heading 1")));
+
+ xField->attach(xCursor);
+
+ // Assert
+ // Make sure the field has the right text
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading above field"), xField->getPresentation(false));
+}
+
+/// If there is referenced text only below, STYLEREF searches down
+CPPUNIT_TEST_FIXTURE(Test, testStyleRefSearchDown)
+{
+ // Arrange
+ // Create a document with headings below a cursor
+ createSwDoc();
+
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+
+ InsertParagraphBreak(xCursor);
+ InsertHeading(xCursor, "Heading below field");
+ InsertHeading(xCursor, "Heading far below field");
+
+ uno::Reference<text::XParagraphCursor> xParagraphCursor(xCursor, uno::UNO_QUERY);
+ xParagraphCursor->gotoPreviousParagraph(false); // Heading far below...
+ xParagraphCursor->gotoPreviousParagraph(false); // Heading below...
+ xParagraphCursor->gotoPreviousParagraph(false); // Blank space
+
+ // Act
+ // Insert a STYLEREF field which looks for "Heading 1"s
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextField> xField(
+ xFactory->createInstance("com.sun.star.text.TextField.GetReference"), uno::UNO_QUERY);
+
+ uno::Reference<beans::XPropertySet> xFieldPropertySet(xField, uno::UNO_QUERY);
+ xFieldPropertySet->setPropertyValue("ReferenceFieldSource",
+ uno::Any(sal_Int16(text::ReferenceFieldSource::STYLE)));
+ xFieldPropertySet->setPropertyValue("ReferenceFieldPart",
+ uno::Any(sal_Int16(text::ReferenceFieldPart::TEXT)));
+ xFieldPropertySet->setPropertyValue("SourceName", uno::Any(OUString("Heading 1")));
+
+ xField->attach(xCursor);
+
+ // Assert
+ // Make sure the field has the right text
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading below field"), xField->getPresentation(false));
+}
+
+/// STYLEREFs in marginals (headers or footers) should search in the page they are on first, regardless if there is anything above them
+CPPUNIT_TEST_FIXTURE(Test, testMarginalStyleRef)
+{
+ // Arrange
+ // Create a document with 2 headings
+ createSwDoc();
+
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+
+ InsertHeading(xCursor, "Top heading on page");
+ InsertHeading(xCursor, "Bottom heading on page");
+
+ // Act
+ // Insert a STYLEREF field which looks for "Heading 1"s into the footer
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextField> xField(
+ xFactory->createInstance("com.sun.star.text.TextField.GetReference"), uno::UNO_QUERY);
+
+ uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent,
+ uno::UNO_QUERY);
+ uno::Reference<container::XNameContainer> xParagraphStylesContainer(
+ xStyleFamiliesSupplier->getStyleFamilies()->getByName("PageStyles"), uno::UNO_QUERY);
+
+ uno::Reference<beans::XPropertySet> xPagePropertySet(
+ xParagraphStylesContainer->getByName("Standard"), uno::UNO_QUERY);
+
+ xPagePropertySet->setPropertyValue("FooterIsOn", uno::Any(true));
+ uno::Reference<text::XText> xFooterText(xPagePropertySet->getPropertyValue("FooterText"),
+ uno::UNO_QUERY);
+
+ uno::Reference<beans::XPropertySet> xFieldPropertySet(xField, uno::UNO_QUERY);
+ xFieldPropertySet->setPropertyValue("ReferenceFieldSource",
+ uno::Any(sal_Int16(text::ReferenceFieldSource::STYLE)));
+ xFieldPropertySet->setPropertyValue("ReferenceFieldPart",
+ uno::Any(sal_Int16(text::ReferenceFieldPart::TEXT)));
+ xFieldPropertySet->setPropertyValue("SourceName", uno::Any(OUString("Heading 1")));
+
+ uno::Reference<text::XTextRange> xFooterCursor = xFooterText->createTextCursor();
+ xField->attach(xFooterCursor);
+
+ // Assert
+ // Make sure the field has the right text
+ CPPUNIT_ASSERT_EQUAL(OUString("Top heading on page"), xField->getPresentation(false));
+}
+
+/// STYLEREFs in footnotes should search from the point of the reference mark
+CPPUNIT_TEST_FIXTURE(Test, testFootnoteStyleRef)
+{
+ // Arrange
+ // Create a document with headings both above and below a cursor
+ createSwDoc();
+
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+
+ InsertHeading(xCursor, "Heading far above reference mark");
+ InsertHeading(xCursor, "Heading above reference mark");
+ InsertParagraphBreak(xCursor);
+ InsertHeading(xCursor, "Heading below reference mark");
+ InsertHeading(xCursor, "Heading far below reference mark");
+
+ uno::Reference<text::XParagraphCursor> xParagraphCursor(xCursor, uno::UNO_QUERY);
+ xParagraphCursor->gotoPreviousParagraph(false); // Heading far below...
+ xParagraphCursor->gotoPreviousParagraph(false); // Heading below...
+ xParagraphCursor->gotoPreviousParagraph(false); // Blank space
+
+ // Act
+ // Insert a STYLEREF field which looks for "Heading 1"s into a footnote
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+
+ uno::Reference<text::XFootnote> xFootnote(
+ xFactory->createInstance("com.sun.star.text.Footnote"), uno::UNO_QUERY);
+ xFootnote->setLabel("Style reference mark");
+ xText->insertTextContent(xCursor, xFootnote, false);
+
+ uno::Reference<text::XTextField> xField(
+ xFactory->createInstance("com.sun.star.text.TextField.GetReference"), uno::UNO_QUERY);
+
+ uno::Reference<beans::XPropertySet> xFieldPropertySet(xField, uno::UNO_QUERY);
+ xFieldPropertySet->setPropertyValue("ReferenceFieldSource",
+ uno::Any(sal_Int16(text::ReferenceFieldSource::STYLE)));
+ xFieldPropertySet->setPropertyValue("ReferenceFieldPart",
+ uno::Any(sal_Int16(text::ReferenceFieldPart::TEXT)));
+ xFieldPropertySet->setPropertyValue("SourceName", uno::Any(OUString("Heading 1")));
+
+ uno::Reference<text::XSimpleText> xFootnoteText(xFootnote, uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xFootnoteCursor = xFootnoteText->createTextCursor();
+ xField->attach(xFootnoteCursor);
+
+ // Assert
+ // Make sure the field has the right text
+ CPPUNIT_ASSERT_EQUAL(OUString("Heading above reference mark"), xField->getPresentation(false));
+}
+
+/// STYLEREFs with the REFFLDFLAG_HIDE_NON_NUMERICAL flag should hide all characters that are not numerical or delimiters
+CPPUNIT_TEST_FIXTURE(Test, testNumericalStyleRef)
+{
+ loadFromFile(u"suppress-non-numerical.docx");
+
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(
+ xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Similarly to testChapterFieldsFollowedBy, the fields are enumerated with #1 first and everything else in reverse order
+ std::vector<std::pair<OUString, OUString>> aFieldValues = {
+ { " Heading 1", "3" }, // #1
+ { " Heading 2", ".2\\@123^&~|a....." }, // #4
+ { " Heading 2", ".2\\|a....." }, // #3
+ { " Heading 1", "Chapter 3.!" }, // #2
+ };
+
+ for (const auto& sValue : aFieldValues)
+ {
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sValue.first, xField->getPresentation(true));
+ CPPUNIT_ASSERT_EQUAL(sValue.second, xField->getPresentation(false));
+ }
+ CPPUNIT_ASSERT(!xFields->hasMoreElements());
+}
+
+/// We should be able to import these flags from OOXML documents
+/// (Note: in Word, STYLEREF 'search bottom up' flag does nothing unless it's in a marginal, we place no such limitation but
+/// this docx only has such stylerefs to avoid confusion)
+CPPUNIT_TEST_FIXTURE(Test, testOOXMLStyleRefFlags)
+{
+ loadFromFile(u"styleref-flags.docx");
+
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(
+ xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Similarly to testChapterFieldsFollowedBy, the fields are enumerated with #1 first and everything else in reverse order
+ std::vector<std::pair<OUString, OUString>> aFieldValues = {
+ { " Heading 2", "2.1" }, // #1
+ { " Heading 1", "3" }, // #5
+ { " Heading 1", "A top level heading at the top of the page" }, // #4
+ { " Heading 1", "The last top level heading" }, // #3
+ { " Heading 2", "Heading 2.1" }, // #2
+ };
+
+ for (const auto& sValue : aFieldValues)
+ {
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sValue.first, xField->getPresentation(true));
+ CPPUNIT_ASSERT_EQUAL(sValue.second, xField->getPresentation(false));
+ }
+ CPPUNIT_ASSERT(!xFields->hasMoreElements());
+}
+
+/// We should be able to import these flags from OOXML documents
+/// (Note: in Word, STYLEREF 'search bottom up' flag does nothing unless it's in a marginal, we place no such limitation but
+/// this docx only has such stylerefs to avoid confusion)
+CPPUNIT_TEST_FIXTURE(Test, testODFStyleRef)
+{
+ loadFromFile(u"styleref.odt");
+
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(
+ xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+
+ // Similarly to testChapterFieldsFollowedBy, the fields are enumerated with #1 first and everything else in reverse order
+ std::vector<std::pair<OUString, OUString>> aFieldValues = {
+ { " Heading 1", "1:" }, // #1
+ { " Heading 2", "In footnotes" }, // #10
+ { " Heading 2", "In document text" }, // #9
+ { " Heading 1", "STYLEREF in different locations" }, // #8
+ { " Heading 1", "2:" }, // #7
+ { " Heading 1", "With STYLEREF, many things are possible" }, // #6
+ { " Heading 1", "1:" }, // #5
+ { " Heading 1", "STYLEREF in different locations" }, // #4
+ { " Heading 1", "2:" }, // #3
+ { " Heading 1", "With STYLEREF, many things are possible" }, // #2
+ };
+
+ for (const auto& sValue : aFieldValues)
+ {
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sValue.first, xField->getPresentation(true));
+ CPPUNIT_ASSERT_EQUAL(sValue.second, xField->getPresentation(false));
+ }
+ CPPUNIT_ASSERT(!xFields->hasMoreElements());
+}
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index c39f4e48edf5..13595d42adbc 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -24,7 +24,7 @@
#include <iodetect.hxx>
#include <docsh.hxx>
-typedef tools::SvRef<SwDocShell> SwDocShellRef;
+typedef rtl::Reference<SwDocShell> SwDocShellRef;
using namespace ::com::sun::star;
@@ -42,6 +42,7 @@ public:
const OUString &rUserData, SfxFilterFlags nFilterFlags,
SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) override;
virtual void setUp() override;
+ virtual void tearDown() override;
// Ensure CVEs remain unbroken
void testCVEs();
@@ -98,7 +99,7 @@ bool SwFiltersTest::filter(const OUString &rFilter, const OUString &rURL,
if (rUserData == FILTER_TEXT_DLG)
{
- pSrcMed->GetItemSet()->Put(
+ pSrcMed->GetItemSet().Put(
SfxStringItem(SID_FILE_FILTEROPTIONS, "UTF8,LF,Liberation Mono,en-US"));
}
@@ -114,11 +115,14 @@ bool SwFiltersTest::filter(const OUString &rFilter, const OUString &rURL,
if (bLoaded)
xDocShRef->ResetError();
- utl::TempFile aTempFile;
- aTempFile.EnableKillingFile();
- SfxMedium aDstMed(aTempFile.GetURL(), StreamMode::STD_WRITE);
- aDstMed.SetFilter(pExportFilter);
- bool bSaved = xDocShRef->DoSaveAs(aDstMed);
+ bool bSaved;
+ {
+ utl::TempFileNamed aTempFile;
+ aTempFile.EnableKillingFile();
+ SfxMedium aDstMed(aTempFile.GetURL(), StreamMode::STD_WRITE);
+ aDstMed.SetFilter(pExportFilter);
+ bSaved = xDocShRef->DoSaveAs(aDstMed);
+ }
if (xDocShRef.is())
xDocShRef->DoClose();
return bSaved;
@@ -144,6 +148,10 @@ void SwFiltersTest::testCVEs()
m_directories.getURLFromSrc(u"/sw/qa/core/data/ww8/"),
FILTER_WW8);
+ testDir("MS WinWord 6.0",
+ m_directories.getURLFromSrc(u"/sw/qa/core/data/ww6/"),
+ sWW6);
+
testDir("MS WinWord 5",
m_directories.getURLFromSrc(u"/sw/qa/core/data/ww5/"),
sWW5);
@@ -208,6 +216,12 @@ void SwFiltersTest::setUp()
CPPUNIT_ASSERT_MESSAGE("no writer component!", m_xWriterComponent.is());
}
+void SwFiltersTest::tearDown()
+{
+ uno::Reference<lang::XComponent>(m_xWriterComponent, uno::UNO_QUERY_THROW)->dispose();
+ m_xWriterComponent.clear();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwFiltersTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/core/filters-test2.cxx b/sw/qa/core/filters-test2.cxx
deleted file mode 100644
index 22fd9cfe525a..000000000000
--- a/sw/qa/core/filters-test2.cxx
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- 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 <unotest/filters-test.hxx>
-#include <test/bootstrapfixture.hxx>
-
-#include <sfx2/app.hxx>
-#include <sfx2/docfilt.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/sfxsids.hrc>
-#include <sfx2/fcontnr.hxx>
-
-#include <svl/stritem.hxx>
-#include <unotools/tempfile.hxx>
-
-#include <iodetect.hxx>
-#include <docsh.hxx>
-
-typedef tools::SvRef<SwDocShell> SwDocShellRef;
-
-using namespace ::com::sun::star;
-
-/* Implementation of Filters test */
-
-class SwFiltersTest2 : public test::FiltersTest, public test::BootstrapFixture
-{
-public:
- virtual bool load(const OUString& rFilter, const OUString& rURL, const OUString& rUserData,
- SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
- unsigned int nFilterVersion) override;
- virtual bool save(const OUString& rFilter, const OUString& rURL, const OUString& rUserData,
- SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
- unsigned int nFilterVersion) override;
- virtual void setUp() override;
-
- // Ensure CVEs remain unbroken
- void testCVEs();
-
- CPPUNIT_TEST_SUITE(SwFiltersTest2);
- CPPUNIT_TEST(testCVEs);
- CPPUNIT_TEST_SUITE_END();
-
-private:
- bool filter(const OUString& rFilter, const OUString& rURL, const OUString& rUserData,
- SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
- unsigned int nFilterVersion, bool bExport);
- uno::Reference<uno::XInterface> m_xWriterComponent;
-};
-
-bool SwFiltersTest2::load(const OUString& rFilter, const OUString& rURL, const OUString& rUserData,
- SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
- unsigned int nFilterVersion)
-{
- return filter(rFilter, rURL, rUserData, nFilterFlags, nClipboardID, nFilterVersion, false);
-}
-
-bool SwFiltersTest2::save(const OUString& rFilter, const OUString& rURL, const OUString& rUserData,
- SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
- unsigned int nFilterVersion)
-{
- return filter(rFilter, rURL, rUserData, nFilterFlags, nClipboardID, nFilterVersion, true);
-}
-
-bool SwFiltersTest2::filter(const OUString& rFilter, const OUString& rURL,
- const OUString& rUserData, SfxFilterFlags nFilterFlags,
- SotClipboardFormatId nClipboardID, unsigned int nFilterVersion,
- bool bExport)
-{
- auto pFilter = std::make_shared<SfxFilter>(rFilter, OUString(), nFilterFlags, nClipboardID,
- OUString(), OUString(), rUserData, OUString());
- pFilter->SetVersion(nFilterVersion);
-
- SwDocShellRef xDocShRef = new SwDocShell;
- SfxMedium* pSrcMed = new SfxMedium(rURL, StreamMode::STD_READ);
-
- std::shared_ptr<const SfxFilter> pImportFilter;
- std::shared_ptr<const SfxFilter> pExportFilter;
- if (bExport)
- {
- SfxGetpApp()->GetFilterMatcher().GuessFilter(*pSrcMed, pImportFilter,
- SfxFilterFlags::IMPORT, SfxFilterFlags::NONE);
- pExportFilter = pFilter;
- }
- else
- pImportFilter = pFilter;
-
- pSrcMed->SetFilter(pImportFilter);
-
- if (rUserData == FILTER_TEXT_DLG)
- {
- pSrcMed->GetItemSet()->Put(
- SfxStringItem(SID_FILE_FILTEROPTIONS, "UTF8,LF,Liberation Mono,en-US"));
- }
-
- bool bLoaded = xDocShRef->DoLoad(pSrcMed);
- if (!bExport)
- {
- if (xDocShRef.is())
- xDocShRef->DoClose();
- return bLoaded;
- }
-
- // How come an error may be set, and still DoLoad() returns success? Strange...
- if (bLoaded)
- xDocShRef->ResetError();
-
- utl::TempFile aTempFile;
- aTempFile.EnableKillingFile();
- SfxMedium aDstMed(aTempFile.GetURL(), StreamMode::STD_WRITE);
- aDstMed.SetFilter(pExportFilter);
- bool bSaved = xDocShRef->DoSaveAs(aDstMed);
- if (xDocShRef.is())
- xDocShRef->DoClose();
- return bSaved;
-}
-
-void SwFiltersTest2::testCVEs()
-{
- testDir("MS WinWord 6.0", m_directories.getURLFromSrc(u"/sw/qa/core/data/ww6/"), sWW6);
-}
-
-void SwFiltersTest2::setUp()
-{
- test::BootstrapFixture::setUp();
-
- //This is a bit of a fudge, we do this to ensure that SwGlobals::ensure,
- //which is a private symbol to us, gets called
- m_xWriterComponent
- = getMultiServiceFactory()->createInstance("com.sun.star.comp.Writer.TextDocument");
- CPPUNIT_ASSERT_MESSAGE("no writer component!", m_xWriterComponent.is());
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(SwFiltersTest2);
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/frmedt/data/floating-table-caption.docx b/sw/qa/core/frmedt/data/floating-table-caption.docx
new file mode 100644
index 000000000000..18c4690322d8
--- /dev/null
+++ b/sw/qa/core/frmedt/data/floating-table-caption.docx
Binary files differ
diff --git a/sw/qa/core/frmedt/frmedt.cxx b/sw/qa/core/frmedt/frmedt.cxx
index 097db6402ae1..37425c13060e 100644
--- a/sw/qa/core/frmedt/frmedt.cxx
+++ b/sw/qa/core/frmedt/frmedt.cxx
@@ -23,18 +23,27 @@
#include <unotxdoc.hxx>
#include <docsh.hxx>
#include <swdtflvr.hxx>
-
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/frmedt/data/";
+#include <caption.hxx>
+#include <view.hxx>
+#include <formatflysplit.hxx>
+#include <itabenum.hxx>
+#include <frmmgr.hxx>
+#include <UndoManager.hxx>
/// Covers sw/source/core/frmedt/ fixes.
class SwCoreFrmedtTest : public SwModelTestBase
{
+public:
+ SwCoreFrmedtTest()
+ : SwModelTestBase("/sw/qa/core/frmedt/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testTextboxReanchor)
{
// Load a document with a textframe and a textbox(shape+textframe).
- load(DATA_DIRECTORY, "textbox-reanchor.odt");
+ createSwDoc("textbox-reanchor.odt");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
SdrPage* pDrawPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
@@ -51,9 +60,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testTextboxReanchor)
SwFrameFormat* pTextFrameFormat = FindFrameFormat(pTextFrameObj);
CPPUNIT_ASSERT_EQUAL(OUString("Frame2"), pTextFrameFormat->GetName());
SwFrameFormat* pDrawShapeFormat = FindFrameFormat(pDrawShape);
- sal_uLong nOldAnchor = pDrawShapeFormat->GetAnchor().GetContentAnchor()->nNode.GetIndex();
+ SwNodeOffset nOldAnchor = pDrawShapeFormat->GetAnchor().GetAnchorNode()->GetIndex();
pShell->FindAnchorPos(pTextFrameObj->GetLastBoundRect().Center(), true);
- sal_uLong nNewAnchor = pDrawShapeFormat->GetAnchor().GetContentAnchor()->nNode.GetIndex();
+ SwNodeOffset nNewAnchor = pDrawShapeFormat->GetAnchor().GetAnchorNode()->GetIndex();
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 6
// - Actual : 9
@@ -65,25 +74,24 @@ CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testVertPosFromBottomBoundingBox)
{
// Insert a shape and anchor it vertically in a way, so its position is from the top of the page
// bottom margin area.
- mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
+ createSwDoc();
uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
xShape->setSize(awt::Size(10000, 10000));
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
- xShapeProps->setPropertyValue("AnchorType",
- uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
- xShapeProps->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::NONE));
+ xShapeProps->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ xShapeProps->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::NONE));
xShapeProps->setPropertyValue("VertOrientRelation",
- uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
- xShapeProps->setPropertyValue("VertOrientPosition",
- uno::makeAny(static_cast<sal_Int32>(-11000)));
+ uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
+ xShapeProps->setPropertyValue("VertOrientPosition", uno::Any(static_cast<sal_Int32>(-11000)));
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
xDrawPageSupplier->getDrawPage()->add(xShape);
// Get the absolute position of the top of the page bottom margin area.
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
- SwTwips nPagePrintAreaBottom = getXPath(pXmlDoc, "//page/infos/prtBounds", "bottom").toInt32();
+ SwTwips nPagePrintAreaBottom
+ = getXPath(pXmlDoc, "//page/infos/prtBounds"_ostr, "bottom"_ostr).toInt32();
// Calculate the allowed bounding box of the shape, e.g. the shape's position & size dialog uses
// this to limit the vertical position to sensible values.
@@ -93,13 +101,13 @@ CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testVertPosFromBottomBoundingBox)
RndStdIds eAnchorType = RndStdIds::FLY_AT_CHAR;
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
const auto& rFrameFormats = *pDoc->GetFrameFormats();
- const SwPosition* pContentPos = rFrameFormats[0]->GetAnchor().GetContentAnchor();
+ const SwFormatAnchor* pFormatAhchor = &rFrameFormats[0]->GetAnchor();
sal_Int16 eHoriRelOrient = text::RelOrientation::PAGE_FRAME;
sal_Int16 eVertRelOrient = text::RelOrientation::PAGE_PRINT_AREA_BOTTOM;
bool bFollowTextFlow = false;
bool bMirror = false;
Size aPercentSize;
- pWrtShell->CalcBoundRect(aBoundRect, eAnchorType, eHoriRelOrient, eVertRelOrient, pContentPos,
+ pWrtShell->CalcBoundRect(aBoundRect, eAnchorType, eHoriRelOrient, eVertRelOrient, pFormatAhchor,
bFollowTextFlow, bMirror, nullptr, &aPercentSize);
// Without the accompanying fix in place, this test would have failed with:
@@ -113,7 +121,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testVertPosFromBottomBoundingBox)
CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testPasteFlyInTextBox)
{
// Given a document that contains a textbox, which contains an sw image (fly frame)
- load(DATA_DIRECTORY, "paste-fly-in-textbox.docx");
+ createSwDoc("paste-fly-in-textbox.docx");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pDocShell = pTextDoc->GetDocShell();
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
@@ -125,7 +133,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);
@@ -139,6 +147,144 @@ CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testPasteFlyInTextBox)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pDoc->GetSpzFrameFormats()->GetFormatCount());
}
+CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testTextBoxSelectCursorPos)
+{
+ // Given a document with a fly+draw format pair (textbox):
+ createSwDoc("paste-fly-in-textbox.docx");
+
+ // When selecting the fly format:
+ SwDoc* pDoc = getSwDoc();
+ SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ SdrObject* pFlyObject = pPage->GetObj(1);
+ SwContact* pFlyContact = static_cast<SwContact*>(pFlyObject->GetUserCall());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(RES_FLYFRMFMT), pFlyContact->GetFormat()->Which());
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SelectObj(Point(), 0, pFlyObject);
+
+ // Then make sure the cursor is the anchor of the draw format:
+ SdrObject* pDrawObject = pPage->GetObj(0);
+ SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(pDrawObject->GetUserCall());
+ SwFrameFormat* pDrawFormat = pDrawContact->GetFormat();
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(RES_DRAWFRMFMT), pDrawFormat->Which());
+ SwNodeOffset nAnchor = pDrawFormat->GetAnchor().GetContentAnchor()->GetNode().GetIndex();
+ SwNodeOffset nCursor = pWrtShell->GetCurrentShellCursor().GetPointNode().GetIndex();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 15 (anchor of draw format)
+ // - Actual : 6 (in-fly-format position)
+ // i.e. the cursor had a broken position after trying to select the fly format.
+ CPPUNIT_ASSERT_EQUAL(nAnchor, nCursor);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testSplitFlyInsertCaption)
+{
+ // Given a document with a full-page floating table:
+ createSwDoc("floating-table-caption.docx");
+
+ // When trying to insert a caption below that table:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->GotoTable("Table1");
+ InsCaptionOpt aOpt;
+ SwView& rView = pWrtShell->GetView();
+ aOpt.SetCategory("Table");
+ aOpt.SetCaption("Numbers English-German");
+ // After, not before.
+ aOpt.SetPos(1);
+ // Without the accompanying fix in place, this call never finished, layout didn't handle content
+ // after the table in a floating table.
+ rView.InsertCaption(&aOpt);
+
+ // Then make sure the insertion finishes and now this is just a plain table-in-frame:
+ SwDoc* pDoc = getSwDoc();
+ sw::SpzFrameFormats& rFlys = *pDoc->GetSpzFrameFormats();
+ sw::SpzFrameFormat* pFly = rFlys[0];
+ CPPUNIT_ASSERT(!pFly->GetAttrSet().GetFlySplit().GetValue());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testSplitFlyUnfloat)
+{
+ // Given a document with a floating table:
+ createSwDoc();
+ SwDoc* pDoc = getSwDocShell()->GetDoc();
+ CPPUNIT_ASSERT(pDoc->GetUndoManager().IsUndoEnabled());
+ pDoc->GetUndoManager().EnableUndo(false);
+ sw::FrameFormats<sw::SpzFrameFormat*>& rFlyFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT(rFlyFormats.empty());
+ // Insert a table:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwInsertTableOptions aTableOptions(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(aTableOptions, /*nRows=*/2, /*nCols=*/1);
+ pWrtShell->MoveTable(GotoPrevTable, fnTableStart);
+ pWrtShell->GoPrevCell();
+ pWrtShell->Insert("A1");
+ pWrtShell->GoNextCell();
+ pWrtShell->Insert("A2");
+ // Select cell:
+ pWrtShell->SelAll();
+ // Select table:
+ pWrtShell->SelAll();
+ // Wrap the table in a text frame:
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ pWrtShell->StartAllAction();
+ aMgr.InsertFlyFrame(RndStdIds::FLY_AT_PARA, aMgr.GetPos(), aMgr.GetSize());
+ pWrtShell->EndAllAction();
+ CPPUNIT_ASSERT(!rFlyFormats.empty());
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetTableFrameFormatCount(/*bUsed=*/true));
+ pDoc->GetUndoManager().EnableUndo(true);
+
+ // When marking that frame and unfloating it:
+ selectShape(1);
+ pWrtShell->UnfloatFlyFrame();
+
+ // Then make sure the frame is removed, but the table is still part of the document:
+ // Without the accompanying fix in place (empty SwFEShell::UnfloatFlyFrame()), this test would
+ // have failed, the frame was not removed.
+ CPPUNIT_ASSERT(rFlyFormats.empty());
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetTableFrameFormatCount(/*bUsed=*/true));
+
+ // When undoing the conversion to inline:
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetUndoManager().GetUndoActionCount());
+ pDoc->GetUndoManager().Undo();
+
+ // Then the undo stack had 2 undo actions and undo-all crashed.
+ CPPUNIT_ASSERT(!rFlyFormats.empty());
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetTableFrameFormatCount(/*bUsed=*/true));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testInsertOnGrfNodeAsChar)
+{
+ // Given a selected as-char image:
+ createSwDoc();
+ SwDoc* pDoc = getSwDocShell()->GetDoc();
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ {
+ SfxItemSet aFrameSet(pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1>);
+ SwFormatAnchor aAnchor(RndStdIds::FLY_AS_CHAR);
+ aFrameSet.Put(aAnchor);
+ Graphic aGrf;
+ pWrtShell->SwFEShell::Insert(OUString(), OUString(), &aGrf, &aFrameSet);
+ }
+
+ // When inserting another as-char image:
+ SfxItemSet aFrameSet(pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1>);
+ SwFormatAnchor aAnchor(RndStdIds::FLY_AS_CHAR);
+ aFrameSet.Put(aAnchor);
+ Graphic aGrf;
+ // Without the accompanying fix in place, this call crashed, we try to set a graphic node as an
+ // anchor of an as-char image (which should be a text node).
+ pWrtShell->SwFEShell::Insert(OUString(), OUString(), &aGrf, &aFrameSet);
+
+ // Then make sure that the anchor of the second image is next to the first anchor:
+ CPPUNIT_ASSERT(pDoc->GetSpzFrameFormats());
+ sw::FrameFormats<sw::SpzFrameFormat*>& rFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rFormats.size());
+ const sw::SpzFrameFormat& rFormat1 = *rFormats[0];
+ const SwPosition* pAnchor1 = rFormat1.GetAnchor().GetContentAnchor();
+ const sw::SpzFrameFormat& rFormat2 = *rFormats[1];
+ const SwPosition* pAnchor2 = rFormat2.GetAnchor().GetContentAnchor();
+ CPPUNIT_ASSERT_EQUAL(pAnchor1->nNode, pAnchor2->nNode);
+ CPPUNIT_ASSERT_EQUAL(pAnchor1->GetContentIndex() + 1, pAnchor2->GetContentIndex());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/header_footer/HeaderFooterTest.cxx b/sw/qa/core/header_footer/HeaderFooterTest.cxx
new file mode 100644
index 000000000000..4d2938ef28dc
--- /dev/null
+++ b/sw/qa/core/header_footer/HeaderFooterTest.cxx
@@ -0,0 +1,1334 @@
+/* -*- 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/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XFootnote.hpp>
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#include <com/sun/star/text/XSimpleText.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextFrame.hpp>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/style/PageStyleLayout.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+
+#include <cppunit/TestAssert.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace
+{
+class HeaderFooterTest : public SwModelTestBase
+{
+public:
+ void checkParagraph(sal_Int32 nNumber, OUString const& rParagraphString,
+ OUString const& rConnectedPageStyle);
+ void checkFirstRestHeaderPageStyles();
+ void checkLeftRightHeaderPageStyles();
+ void checkFirstLeftRightHeaderPageStyles();
+ void checkDoubleFirstLeftRightHeaderPageStyles(OUString const& rCustomPageStyleName);
+ void checkShapeInFirstPageHeader();
+
+ HeaderFooterTest()
+ : SwModelTestBase("/sw/qa/core/header_footer/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testStashedHeaderFooter)
+{
+ createSwDoc();
+ SwDoc* pSourceDocument = getSwDoc();
+ uno::Reference<lang::XComponent> xSourceDocument = mxComponent;
+ mxComponent.clear();
+
+ createSwDoc();
+ SwDoc* pTargetDocument = getSwDoc();
+ uno::Reference<lang::XComponent> xTargetDocument = mxComponent;
+ mxComponent.clear();
+
+ // Source
+ SwPageDesc* pSourcePageDesc = pSourceDocument->MakePageDesc("SourceStyle");
+ pSourcePageDesc->ChgFirstShare(false);
+ CPPUNIT_ASSERT(!pSourcePageDesc->IsFirstShared());
+ pSourcePageDesc->StashFrameFormat(pSourcePageDesc->GetFirstMaster(), true, false, true);
+ pSourceDocument->ChgPageDesc("SourceStyle", *pSourcePageDesc);
+ CPPUNIT_ASSERT(pSourcePageDesc->HasStashedFormat(true, false, true));
+
+ // Target
+ SwPageDesc* pTargetPageDesc = pTargetDocument->MakePageDesc("TargetStyle");
+
+ // Copy source to target
+ pTargetDocument->CopyPageDesc(*pSourcePageDesc, *pTargetPageDesc);
+
+ // Check the stashed frame format is copied
+ CPPUNIT_ASSERT(pTargetPageDesc->HasStashedFormat(true, false, true));
+
+ // Check document instance
+ auto pSourceStashedFormat = pSourcePageDesc->GetStashedFrameFormat(true, false, true);
+ CPPUNIT_ASSERT_EQUAL(true, pSourceStashedFormat->GetDoc() == pSourceDocument);
+
+ auto pTargetStashedFormat = pTargetPageDesc->GetStashedFrameFormat(true, false, true);
+ CPPUNIT_ASSERT_EQUAL(true, pTargetStashedFormat->GetDoc() == pTargetDocument);
+
+ xSourceDocument->dispose();
+ xTargetDocument->dispose();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testNonFirstHeaderIsDisabled)
+{
+ // related to tdf#127778
+ // Header for the first page is enabled, but for the second page it should be disabled or act like it is disabled
+ // so the header vertical size is consistent.
+
+ createSwDoc("tdf127778.docx");
+
+ // TODO
+
+ // Header can only be enabled or disabled, but can't be disabled just for first, left or right page.
+ // If a header is enabled but empty, the header still takes space in LO, but not in MSO, where it acts the same as
+ // if it is disabled.
+}
+
+// Check for correct header/footer with special first page with TOC inside
+// Related to tdf#118393
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testHeaderFooterWithSpecialFirstPage_OOXML)
+{
+ // Load, save in OOXML format and reload
+ createSwDoc("tdf118393.odt");
+ saveAndReload("Office Open XML Text");
+
+ CPPUNIT_ASSERT_EQUAL(7, getPages());
+
+ {
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // check first page
+ assertXPath(pXmlDoc, "/root/page[1]/header"_ostr);
+ assertXPath(pXmlDoc, "/root/page[1]/footer"_ostr);
+ assertXPath(pXmlDoc, "/root/page[1]/header/txt/text()"_ostr, 0);
+ assertXPath(pXmlDoc, "/root/page[1]/footer/txt/text()"_ostr, 0);
+ // check second page in the same way
+ assertXPath(pXmlDoc, "/root/page[2]/header"_ostr);
+ assertXPath(pXmlDoc, "/root/page[2]/footer"_ostr);
+ }
+ // All other pages should have header/footer
+ OUString sExpected("Seite * von *");
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[2]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[2]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[3]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[3]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[4]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[4]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[5]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[5]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[6]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[6]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[7]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[7]/footer/txt/text()"_ostr));
+}
+
+// Check for correct header/footer with special first page with TOC inside
+// Related to tdf#118393
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testHeaderFooterWithSpecialFirstPage_ODF)
+{
+ // Load, save in ODF format and reload
+ createSwDoc("tdf118393.odt");
+ saveAndReload("writer8");
+
+ CPPUNIT_ASSERT_EQUAL(7, getPages());
+
+ // First page has no header/footer
+ {
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // check first page
+ assertXPath(pXmlDoc, "/root/page[1]/header"_ostr, 0);
+ assertXPath(pXmlDoc, "/root/page[1]/footer"_ostr, 0);
+ // check second page in the same way
+ assertXPath(pXmlDoc, "/root/page[2]/header"_ostr);
+ assertXPath(pXmlDoc, "/root/page[2]/footer"_ostr);
+ }
+
+ // All other pages should have header/footer
+ OUString sExpected("Seite * von *");
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[2]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[2]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[3]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[3]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[4]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[4]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[5]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[5]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[6]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[6]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[7]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(sExpected, parseDump("/root/page[7]/footer/txt/text()"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFloatingTableInHeader)
+{
+ // Related to tdf#79639
+ createSwDoc("tdf79639.docx");
+
+ // This was 0, floating table in header wasn't converted to a TextFrame.
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+ saveAndReload("Office Open XML Text");
+
+ // This was 0, floating table in header wasn't converted to a TextFrame.
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFdo64238_a)
+{
+ createSwDoc("fdo64238_a.docx");
+
+ // The problem was that when 'Show Only Odd Footer' was marked in Word and the Even footer *was filled*
+ // then LO would still import the Even footer and concatenate it to the odd footer.
+ // This case specifically is for :
+ // 'Blank Odd Footer' with 'Non-Blank Even Footer' when 'Show Only Odd Footer' is marked in Word
+ // In this case the imported footer in LO was supposed to be blank, but instead was the 'even' footer
+ uno::Reference<text::XText> xFooterText = getProperty<uno::Reference<text::XText>>(
+ getStyles("PageStyles")->getByName("Standard"), "FooterText");
+ uno::Reference<text::XTextRange> xFooterParagraph = getParagraphOfText(1, xFooterText);
+ uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xFooterParagraph, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
+ sal_Int32 numOfRuns = 0;
+ while (xRunEnum->hasMoreElements())
+ {
+ xRunEnum->nextElement();
+ numOfRuns++;
+ }
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), numOfRuns);
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFdo64238_b)
+{
+ createSwDoc("fdo64238_b.docx");
+
+ // The problem was that when 'Show Only Odd Footer' was marked in Word and the Even footer *was filled*
+ // then LO would still import the Even footer and concatenate it to the odd footer.
+ // This case specifically is for :
+ // 'Non-Blank Odd Footer' with 'Non-Blank Even Footer' when 'Show Only Odd Footer' is marked in Word
+ // In this case the imported footer in LO was supposed to be just the odd footer, but instead was the 'odd' and 'even' footers concatenated
+ uno::Reference<text::XText> xFooterText = getProperty<uno::Reference<text::XText>>(
+ getStyles("PageStyles")->getByName("Standard"), "FooterText");
+ uno::Reference<text::XTextRange> xFooterParagraph = getParagraphOfText(1, xFooterText);
+ uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xFooterParagraph, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
+ sal_Int32 numOfRuns = 0;
+ while (xRunEnum->hasMoreElements())
+ {
+ xRunEnum->nextElement();
+ numOfRuns++;
+ }
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), numOfRuns);
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstPageHeadersAndEmptyFooters)
+{
+ // Test for fdo#66145
+
+ // Test case where headers and footers for first page are set, but footers are empty
+ auto verify = [this]() {
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the FIRST page header."),
+ parseDump("/root/page[1]/header/txt/text()"_ostr));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the header for the REST OF THE FILE."),
+ parseDump("/root/page[2]/header/txt/text()"_ostr));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the header for the REST OF THE FILE."),
+ parseDump("/root/page[3]/header/txt/text()"_ostr));
+ };
+
+ createSwDoc("fdo66145.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstHeaderFooterImport)
+{
+ // Test import and export of a section's headerf/footerf properties.
+ // (copied from a ww8export test, with doc converted to docx using Word)
+ auto verify = [this]() {
+ CPPUNIT_ASSERT_EQUAL(6, getPages());
+
+ // The document has 6 pages. Note that we don't test if 4 or just 2 page
+ // styles are created, the point is that layout should be correct.
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header"),
+ parseDump("/root/page[1]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer"),
+ parseDump("/root/page[1]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page header"),
+ parseDump("/root/page[2]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page footer"),
+ parseDump("/root/page[2]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page header"),
+ parseDump("/root/page[3]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page footer"),
+ parseDump("/root/page[3]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header2"),
+ parseDump("/root/page[4]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer 2"),
+ parseDump("/root/page[4]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page header 2"),
+ parseDump("/root/page[5]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page footer 2"),
+ parseDump("/root/page[5]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page header 2"),
+ parseDump("/root/page[6]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page footer 2"),
+ parseDump("/root/page[6]/footer/txt/text()"_ostr));
+ };
+
+ createSwDoc("first-header-footer.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstHeaderFooterRoundTrip)
+{
+ createSwDoc("first-header-footerB.odt");
+ saveAndReload("Office Open XML Text");
+
+ CPPUNIT_ASSERT_EQUAL(6, getPages());
+
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header"),
+ parseDump("/root/page[1]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer"),
+ parseDump("/root/page[1]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page header"),
+ parseDump("/root/page[2]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page footer"),
+ parseDump("/root/page[2]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page header"),
+ parseDump("/root/page[3]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page footer"),
+ parseDump("/root/page[3]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header2"),
+ parseDump("/root/page[4]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer 2"),
+ parseDump("/root/page[4]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page header 2"),
+ parseDump("/root/page[5]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page footer 2"),
+ parseDump("/root/page[5]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page header 2"),
+ parseDump("/root/page[6]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page footer 2"),
+ parseDump("/root/page[6]/footer/txt/text()"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstHeaderFooter_ODF)
+{
+ createSwDoc("first-header-footer.odt");
+ saveAndReload("writer8");
+
+ CPPUNIT_ASSERT_EQUAL(6, getPages());
+ // Test import and export of the header-first token.
+
+ // The document has 6 pages, two page styles for the first and second half of pages.
+ CPPUNIT_ASSERT_EQUAL(OUString("First header"),
+ parseDump("/root/page[1]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First footer"),
+ parseDump("/root/page[1]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Left header"),
+ parseDump("/root/page[2]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Left footer"),
+ parseDump("/root/page[2]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Right header"),
+ parseDump("/root/page[3]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Right footer"),
+ parseDump("/root/page[3]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First header2"),
+ parseDump("/root/page[4]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First footer2"),
+ parseDump("/root/page[4]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Right header2"),
+ parseDump("/root/page[5]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Right footer2"),
+ parseDump("/root/page[5]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Left header2"),
+ parseDump("/root/page[6]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Left footer2"),
+ parseDump("/root/page[6]/footer/txt/text()"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstHeaderFooter_DOC)
+{
+ createSwDoc("first-header-footer.doc");
+ saveAndReload("MS Word 97");
+
+ // Test import and export of a section's headerf/footerf properties.
+
+ // The document has 6 pages. Note that we don't test if 4 or just 2 page
+ // styles are created, the point is that layout should be correct.
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header"),
+ parseDump("/root/page[1]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer"),
+ parseDump("/root/page[1]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page header"),
+ parseDump("/root/page[2]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page footer"),
+ parseDump("/root/page[2]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page header"),
+ parseDump("/root/page[3]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page footer"),
+ parseDump("/root/page[3]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header2"),
+ parseDump("/root/page[4]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer 2"),
+ parseDump("/root/page[4]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page header 2"),
+ parseDump("/root/page[5]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page footer 2"),
+ parseDump("/root/page[5]/footer/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page header 2"),
+ parseDump("/root/page[6]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page footer 2"),
+ parseDump("/root/page[6]/footer/txt/text()"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFdo65655)
+{
+ // related - fdo#65655
+
+ // The problem was that the DOCX had a non-blank odd footer and a blank even footer
+ // The 'Different Odd & Even Pages' was turned on
+ // However - LO assumed that because the 'even' footer is blank - it should ignore the 'Different Odd & Even Pages' flag
+ // So it did not import it and did not export it
+
+ auto verify = [this]() {
+ uno::Reference<beans::XPropertySet> xPropertySet(
+ getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ {
+ bool bValue = false;
+ xPropertySet->getPropertyValue("HeaderIsShared") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL(false, bValue);
+ }
+ {
+ bool bValue = false;
+ xPropertySet->getPropertyValue("FooterIsShared") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL(false, bValue);
+ }
+ };
+ createSwDoc("fdo65655.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testImageInHeader)
+{
+ // Related bug tdf#57155
+ createSwDoc("tdf57155.docx");
+
+ // Without the fix in place, the image in the header of page 2 wouldn't exist
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ saveAndReload("Office Open XML Text");
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testImageInFooter)
+{
+ // Related bug tdf#129582
+ createSwDoc("tdf129582.docx");
+
+ // Without the fix in place, the image in the footer of page 2 wouldn't exist
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+
+ saveAndReload("Office Open XML Text");
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ CPPUNIT_ASSERT_EQUAL(2, getShapes());
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf112694)
+{
+ auto verify = [this]() {
+ uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard");
+ // Header was on when header for file was for explicit first pages only
+ // but <w:titlePg> was missing.
+ CPPUNIT_ASSERT(!getProperty<bool>(aPageStyle, "HeaderIsOn"));
+ };
+
+ createSwDoc("tdf112694.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testContSectBreakHeaderFooter)
+{
+ auto verify = [this]() {
+ // Load a document with a continuous section break on page 2.
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header, section 1"),
+ parseDump("/root/page[1]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer, section 1"),
+ parseDump("/root/page[1]/footer/txt/text()"_ostr));
+
+ // Make sure the header stays like this; if we naively just update the page style name of the
+ // first para on page 2, then this would be 'Header, section 2', which is incorrect.
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header, section 2"),
+ parseDump("/root/page[2]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer, section 2"),
+ parseDump("/root/page[2]/footer/txt/text()"_ostr));
+
+ // This is inherited from page 2.
+ CPPUNIT_ASSERT_EQUAL(OUString("Header, section 2"),
+ parseDump("/root/page[3]/header/txt/text()"_ostr));
+ CPPUNIT_ASSERT_EQUAL(OUString("Footer, section 3"),
+ parseDump("/root/page[3]/footer/txt/text()"_ostr));
+
+ // Without the export fix in place, the import-export-import test would have failed with:
+ // - Expected: Header, section 2
+ // - Actual : First page header, section 2
+ // i.e. both the header and the footer on page 3 was wrong.
+
+ // Additional problem: top margin on page 3 was wrong.
+ if (isExported())
+ {
+ xmlDocUniquePtr pXml = parseExport("word/document.xml");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2200
+ // - Actual : 2574
+ // i.e. the top margin on page 3 was too large and now matches the value from the input
+ // document.
+ assertXPath(pXml, "/w:document/w:body/w:sectPr/w:pgMar"_ostr, "top"_ostr, "2200");
+ }
+ };
+
+ createSwDoc("cont-sect-break-header-footer.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf145998_firstHeader)
+{
+ createSwDoc("tdf145998_firstHeader.odt");
+ saveAndReload("Office Open XML Text");
+
+ // Sanity check - always good to test when dealing with page styles and breaks.
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Very first header"), parseDump("/root/page[1]/header/txt"_ostr));
+
+ // Page Style is already used in prior section - this can't be the first-header
+ CPPUNIT_ASSERT_EQUAL(OUString("Normal Header"), parseDump("/root/page[2]/header/txt"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testEvenPageOddPageFooter_Import)
+{
+ // Related tdf#135216
+
+ createSwDoc("tdf135216_evenOddFooter.docx");
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
+ xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(),
+ uno::UNO_QUERY);
+
+ // get LO page style for the first page (even page #2)
+ OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
+ uno::Reference<style::XStyle> xPageStyle(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+
+ xCursor->jumpToFirstPage(); // Even/Left page #2
+ uno::Reference<text::XText> xFooter
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextLeft");
+ CPPUNIT_ASSERT_EQUAL(OUString("even page"), xFooter->getString());
+
+ xCursor->jumpToNextPage();
+ pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xPageStyle.set(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+ xFooter.set(getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextFirst"));
+ CPPUNIT_ASSERT_EQUAL(OUString("odd page - first footer"), xFooter->getString());
+
+ xCursor->jumpToNextPage();
+ pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xPageStyle.set(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+ xFooter.set(getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextLeft"));
+ CPPUNIT_ASSERT_EQUAL(OUString("even page"), xFooter->getString());
+
+ // The contents of paragraph 2 should be the page number (2) located on page 1.
+ getParagraph(2, "2");
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testEvenPageOddPageFooter_Roundtrip)
+{
+ // Related tdf#135216
+
+ // Load, save as OOXML and reload
+ createSwDoc("tdf135216_evenOddFooter.odt");
+ saveAndReload("Office Open XML Text");
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
+ xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(),
+ uno::UNO_QUERY);
+
+ // get LO page style for the first page (even page #2)
+ OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
+ uno::Reference<style::XStyle> xPageStyle(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+
+ xCursor->jumpToFirstPage(); // Even/Left page #2
+ uno::Reference<text::XText> xFooter
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextLeft");
+ CPPUNIT_ASSERT_EQUAL(OUString("even page"), xFooter->getString());
+
+ xCursor->jumpToNextPage();
+ pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xPageStyle.set(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+ xFooter.set(getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextFirst"));
+ CPPUNIT_ASSERT_EQUAL(OUString("odd page - first footer"), xFooter->getString());
+
+ xCursor->jumpToNextPage();
+ pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xPageStyle.set(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+ xFooter.set(getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextLeft"));
+ CPPUNIT_ASSERT_EQUAL(OUString("even page"), xFooter->getString());
+
+ // The contents of paragraph 2 should be the page number (2) located on page 1.
+ getParagraph(2, "2");
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf69635)
+{
+ createSwDoc("tdf69635.docx");
+ saveAndReload("Office Open XML Text");
+
+ xmlDocUniquePtr pXmlHeader1 = parseExport("word/header1.xml");
+ CPPUNIT_ASSERT(pXmlHeader1);
+
+ xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
+ CPPUNIT_ASSERT(pXmlSettings);
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: "left"
+ // - Actual : "right"
+ assertXPathContent(pXmlHeader1, "/w:hdr/w:p/w:r/w:t"_ostr, "left");
+
+ // Make sure "left" appears as a hidden header
+ assertXPath(pXmlSettings, "/w:settings/w:evenAndOddHeaders"_ostr, 0);
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf113849_evenAndOddHeaders)
+{
+ createSwDoc("tdf113849_evenAndOddHeaders.odt");
+ saveAndReload("Office Open XML Text");
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Header2 text", OUString("L. J. Kendall"),
+ parseDump("/root/page[2]/header/txt"_ostr));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footer2 text", OUString("*"),
+ parseDump("/root/page[2]/footer/txt"_ostr));
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Header3 text", OUString("Shadow Hunt"),
+ parseDump("/root/page[3]/header/txt"_ostr));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footer3 text", OUString("*"),
+ parseDump("/root/page[3]/footer/txt"_ostr));
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Header4 text", OUString("L. J. Kendall"),
+ parseDump("/root/page[4]/header/txt"_ostr));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footer4 text", OUString("*"),
+ parseDump("/root/page[4]/footer/txt"_ostr));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footer5 text", OUString(""),
+ parseDump("/root/page[5]/footer/txt"_ostr));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Footer6 text", OUString(""),
+ parseDump("/root/page[6]/footer/txt"_ostr));
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of pages", 6, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstPageFooterEnabled)
+{
+ // tdf#106572
+ // Page style with first page and other pages.
+ // Footer shouldn't be enabled on first page, but then on the other pages
+ auto verify = [this]() {
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // TODO
+ // It's currently not possible to disable the header on first page only.
+ //assertXPath(pXmlDoc, "/root/page[1]/footer/txt"_ostr, 0);
+ assertXPath(pXmlDoc, "/root/page[1]/footer/txt"_ostr);
+ };
+ createSwDoc("TestFirstFooterDisabled.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testBnc519228OddBreaks)
+{
+ auto verify = [this]() {
+ // Check that all the normal styles are not set as right-only, those should be only those used after odd page breaks.
+ auto xStyles = getStyles("PageStyles");
+ uno::Reference<beans::XPropertySet> xStyle;
+ {
+ xStyle.set(xStyles->getByName("Standard"), uno::UNO_QUERY);
+ auto aPageLayout = xStyle->getPropertyValue("PageStyleLayout");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(style::PageStyleLayout_ALL), aPageLayout);
+ }
+ {
+ xStyle.set(xStyles->getByName("First Page"), uno::UNO_QUERY);
+ auto aPageLayout = xStyle->getPropertyValue("PageStyleLayout");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(style::PageStyleLayout_ALL), aPageLayout);
+ }
+
+ uno::Reference<beans::XPropertySet> page1Style;
+ {
+ auto xPara = getParagraph(1);
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the first page."), xPara->getString());
+ OUString page1StyleName = getProperty<OUString>(xPara, "PageDescName");
+ page1Style.set(xStyles->getByName(page1StyleName), uno::UNO_QUERY);
+ auto aPageLayout = page1Style->getPropertyValue("PageStyleLayout");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(style::PageStyleLayout_RIGHT), aPageLayout);
+
+ auto xHeaderText = getProperty<uno::Reference<text::XText>>(page1Style, "HeaderText");
+ auto xHeaderPara = getParagraphOfText(1, xHeaderText);
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the header for odd pages"),
+ xHeaderPara->getString());
+ }
+
+ // Page2 comes from follow of style for page 1 and should be a normal page. Also check the two page style have the same properties,
+ // since page style for page1 was created from page style for page 2.
+ {
+ auto aFollowStyleName = getProperty<OUString>(page1Style, "FollowStyle");
+
+ uno::Reference<beans::XPropertySet> page2Style;
+ page2Style.set(xStyles->getByName(aFollowStyleName), uno::UNO_QUERY);
+ auto aPage2Layout = page2Style->getPropertyValue("PageStyleLayout");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(style::PageStyleLayout_ALL), aPage2Layout);
+
+ auto xHeaderTextLeft
+ = getProperty<uno::Reference<text::XText>>(page2Style, "HeaderTextLeft");
+ auto xHeaderLeftPara = getParagraphOfText(1, xHeaderTextLeft);
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the even header"), xHeaderLeftPara->getString());
+
+ auto xHeaderTextRight
+ = getProperty<uno::Reference<text::XText>>(page2Style, "HeaderTextRight");
+ auto xHeaderRightPara = getParagraphOfText(1, xHeaderTextRight);
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the header for odd pages"),
+ xHeaderRightPara->getString());
+
+ CPPUNIT_ASSERT_EQUAL(getProperty<sal_Int32>(page1Style, "TopMargin"),
+ getProperty<sal_Int32>(page2Style, "TopMargin"));
+ }
+
+ // Page 5
+ {
+ auto xPara = getParagraph(4);
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Then an odd break after an odd page, should lead us to page #5."),
+ xPara->getString());
+
+ OUString page5StyleName = getProperty<OUString>(xPara, "PageDescName");
+ uno::Reference<beans::XPropertySet> page5Style(xStyles->getByName(page5StyleName),
+ uno::UNO_QUERY);
+ auto aPageLayout = page5Style->getPropertyValue("PageStyleLayout");
+ CPPUNIT_ASSERT_EQUAL(uno::Any(style::PageStyleLayout_RIGHT), aPageLayout);
+
+ auto xHeaderText = getProperty<uno::Reference<text::XText>>(page5Style, "HeaderText");
+ auto xHeaderTextPara = getParagraphOfText(1, xHeaderText);
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the header for odd pages"),
+ xHeaderTextPara->getString());
+ }
+ };
+
+ createSwDoc("bnc519228_odd-breaksB.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testBnc875718)
+{
+ createSwDoc("bnc875718.docx");
+ //saveAndReload("Office Open XML Text");
+
+ // The frame in the footer must not accidentally end up in the document body.
+ // The easiest way for this to test I've found is checking that
+ // xray ThisComponent.TextFrames.GetByIndex( index ).Anchor.Text.ImplementationName
+ // is not SwXBodyText but rather SwXHeadFootText
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(),
+ uno::UNO_QUERY);
+
+ // The sample bugdoc has 3 footer.xml and has a textframe in each. The first one is hidden
+ // and it has no text in its anchored text range: it is anchored to body text.
+ // At least one text frame should be connected to the header/footer
+
+ sal_Int32 nCheck = 0;
+ for (sal_Int32 i = 0; i < xIndexAccess->getCount(); ++i)
+ {
+ uno::Reference<text::XTextFrame> frame(xIndexAccess->getByIndex(i), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> range = frame->getAnchor();
+ uno::Reference<lang::XServiceInfo> aText(range->getText(), uno::UNO_QUERY);
+ OString aMessage("TextFrame " + OString::number(i) + "XText content is empty");
+ if (aText.is())
+ {
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(aMessage.getStr(), OUString("SwXHeadFootText"),
+ aText->getImplementationName());
+ nCheck++;
+ }
+ }
+ CPPUNIT_ASSERT(nCheck > 0);
+
+ // Also check that the footer contents are not in the body text.
+ uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> aText = textDocument->getText();
+ CPPUNIT_ASSERT(aText.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Text"), aText->getString());
+}
+
+// base class to supply a helper method for testHFLinkToPrev
+class TestHFBase : public HeaderFooterTest
+{
+protected:
+ OUString getHFText(const uno::Reference<style::XStyle>& xPageStyle, const OUString& sPropName)
+ {
+ auto xTextRange = getProperty<uno::Reference<text::XTextRange>>(xPageStyle, sPropName);
+ return xTextRange->getString();
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(TestHFBase, testHFLinkToPrev)
+{
+ auto verify = [this]() {
+ uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
+
+ // get a page cursor
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
+ xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(),
+ uno::UNO_QUERY);
+
+ // get LO page style for page 1, corresponding to docx section 1 first page
+ xCursor->jumpToFirstPage();
+ OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ uno::Reference<style::XStyle> xPageStyle(xPageStyles->getByName(pageStyleName),
+ uno::UNO_QUERY);
+ // check page 1 header & footer text
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header for all sections"),
+ getHFText(xPageStyle, "HeaderTextFirst"));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer for section 1 only"),
+ getHFText(xPageStyle, "FooterTextFirst"));
+
+ // get LO page style for page 2, corresponding to docx section 1
+ xCursor->jumpToPage(2);
+ pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xPageStyle.set(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+ // check header & footer text
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page header for section 1 only"),
+ getHFText(xPageStyle, "HeaderTextLeft"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page footer for all sections"),
+ getHFText(xPageStyle, "FooterTextLeft"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page header for all sections"),
+ getHFText(xPageStyle, "HeaderText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page footer for section 1 only"),
+ getHFText(xPageStyle, "FooterText"));
+
+ // get LO page style for page 4, corresponding to docx section 2 first page
+ xCursor->jumpToPage(4);
+ pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xPageStyle.set(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+ // check header & footer text
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header for all sections"),
+ getHFText(xPageStyle, "HeaderTextFirst"));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer for sections 2 and 3 only"),
+ getHFText(xPageStyle, "FooterTextFirst"));
+
+ // get LO page style for page 5, corresponding to docx section 2
+ xCursor->jumpToPage(5);
+ pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xPageStyle.set(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+ // check header & footer text
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page header for sections 2 and 3 only"),
+ getHFText(xPageStyle, "HeaderTextLeft"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page footer for all sections"),
+ getHFText(xPageStyle, "FooterTextLeft"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page header for all sections"),
+ getHFText(xPageStyle, "HeaderText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page footer for sections 2 and 3 only"),
+ getHFText(xPageStyle, "FooterText"));
+
+ // get LO page style for page 7, corresponding to docx section 3 first page
+ xCursor->jumpToPage(7);
+ pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xPageStyle.set(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+ // check header & footer text
+ CPPUNIT_ASSERT_EQUAL(OUString("First page header for all sections"),
+ getHFText(xPageStyle, "HeaderTextFirst"));
+ CPPUNIT_ASSERT_EQUAL(OUString("First page footer for sections 2 and 3 only"),
+ getHFText(xPageStyle, "FooterTextFirst"));
+
+ // get LO page style for page 8, corresponding to docx section 3
+ xCursor->jumpToPage(8);
+ pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xPageStyle.set(xPageStyles->getByName(pageStyleName), uno::UNO_QUERY);
+ // check header & footer text
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page header for sections 2 and 3 only"),
+ getHFText(xPageStyle, "HeaderTextLeft"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Even page footer for all sections"),
+ getHFText(xPageStyle, "FooterTextLeft"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page header for all sections"),
+ getHFText(xPageStyle, "HeaderText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Odd page footer for sections 2 and 3 only"),
+ getHFText(xPageStyle, "FooterText"));
+ };
+ createSwDoc("headerfooter-link-to-prev.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testN750935)
+{
+ auto verify = [this]() {
+ // Some page break types were ignores, resulting in less pages.
+ CPPUNIT_ASSERT_EQUAL(5, getPages());
+
+ // The problem was that the header and footer was not shared.
+ // xray ThisComponent.StyleFamilies.PageStyles.Default.FooterIsShared
+ uno::Reference<beans::XPropertySet> xPropertySet(
+ getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+ bool bValue = false;
+ xPropertySet->getPropertyValue("HeaderIsShared") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL(true, bValue);
+ xPropertySet->getPropertyValue("FooterIsShared") >>= bValue;
+ CPPUNIT_ASSERT_EQUAL(true, bValue);
+ };
+ createSwDoc("n750935.docx");
+ verify();
+ saveAndReload("Office Open XML Text");
+ verify();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testOnlyLeftPageStyle)
+{
+ createSwDoc("TestPageStyleOnlyLeft.docx");
+ saveAndReload("Office Open XML Text");
+ // There should be 2 pages - first page should be blank
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testMsoPosition)
+{
+ auto verifyFooter = [this]() {
+ xmlDocUniquePtr doc = parseExport("word/footer2.xml");
+ // We write the frames out in different order than they were read, so check it's the correct
+ // textbox first by checking width. These tests may need reordering if that gets fixed.
+ OUString style1
+ = getXPath(doc, "/w:ftr/w:p/w:r[3]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"_ostr,
+ "style"_ostr);
+ CPPUNIT_ASSERT(style1.indexOf(";width:531pt;") >= 0);
+ CPPUNIT_ASSERT(style1.indexOf(";mso-position-vertical-relative:page") >= 0);
+ CPPUNIT_ASSERT(style1.indexOf(";mso-position-horizontal-relative:page") >= 0);
+ OUString style2
+ = getXPath(doc, "/w:ftr/w:p/w:r[4]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"_ostr,
+ "style"_ostr);
+ CPPUNIT_ASSERT(style2.indexOf(";width:549pt;") >= 0);
+ CPPUNIT_ASSERT(style2.indexOf(";mso-position-vertical-relative:text") >= 0);
+ CPPUNIT_ASSERT(style2.indexOf(";mso-position-horizontal:center") >= 0);
+ CPPUNIT_ASSERT(style2.indexOf(";mso-position-horizontal-relative:text") >= 0);
+ OUString style3
+ = getXPath(doc, "/w:ftr/w:p/w:r[5]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"_ostr,
+ "style"_ostr);
+ CPPUNIT_ASSERT(style3.indexOf(";width:36pt;") >= 0);
+ CPPUNIT_ASSERT(style3.indexOf(";mso-position-horizontal-relative:text") >= 0);
+ CPPUNIT_ASSERT(style3.indexOf(";mso-position-vertical-relative:text") >= 0);
+ };
+
+ auto verifyHeader = [this]() {
+ xmlDocUniquePtr doc = parseExport("word/header2.xml");
+ OUString style1
+ = getXPath(doc, "/w:hdr/w:p/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"_ostr,
+ "style"_ostr);
+ CPPUNIT_ASSERT(style1.indexOf(";width:335.75pt;") >= 0);
+ CPPUNIT_ASSERT(style1.indexOf(";mso-position-horizontal-relative:page") >= 0);
+ CPPUNIT_ASSERT(style1.indexOf(";mso-position-vertical-relative:page") >= 0);
+ OUString style2
+ = getXPath(doc, "/w:hdr/w:p/w:r[3]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"_ostr,
+ "style"_ostr);
+ CPPUNIT_ASSERT(style2.indexOf(";width:138.15pt;") >= 0);
+ CPPUNIT_ASSERT(style2.indexOf(";mso-position-horizontal-relative:page") >= 0);
+ CPPUNIT_ASSERT(style2.indexOf(";mso-position-vertical-relative:page") >= 0);
+ OUString style3
+ = getXPath(doc, "/w:hdr/w:p/w:r[4]/mc:AlternateContent/mc:Fallback/w:pict/v:rect"_ostr,
+ "style"_ostr);
+ CPPUNIT_ASSERT(style3.indexOf(";width:163.8pt;") >= 0);
+ CPPUNIT_ASSERT(style3.indexOf(";mso-position-horizontal-relative:page") >= 0);
+ CPPUNIT_ASSERT(style3.indexOf(";mso-position-vertical-relative:page") >= 0);
+ };
+
+ createSwDoc("bnc884615-mso-position.docx");
+ saveAndReload("Office Open XML Text");
+ verifyHeader();
+ verifyFooter();
+}
+
+void HeaderFooterTest::checkParagraph(sal_Int32 nNumber, OUString const& rParagraphString,
+ OUString const& rConnectedPageStyle)
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getParagraphOrTable(nNumber), uno::UNO_QUERY);
+
+ uno::Reference<text::XTextRange> xTextRange(xPropertySet, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(rParagraphString, xTextRange->getString());
+
+ OUString pageStyle;
+ xPropertySet->getPropertyValue("PageStyleName") >>= pageStyle;
+ CPPUNIT_ASSERT_EQUAL(rConnectedPageStyle, pageStyle);
+}
+
+void HeaderFooterTest::checkFirstRestHeaderPageStyles()
+{
+ // Page 1
+ checkParagraph(1, "P1", "Standard");
+
+ // Page 2
+ checkParagraph(2, "P2", "Standard");
+
+ // Page 3
+ checkParagraph(3, "P3", "Standard");
+
+ // Check Default Style
+ {
+ uno::Reference<beans::XPropertySet> xPageStyle(
+ getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+
+ bool bHeader = getProperty<bool>(xPageStyle, "HeaderIsOn");
+ CPPUNIT_ASSERT_EQUAL(true, bHeader);
+
+ bool bHeaderIsShared = getProperty<bool>(xPageStyle, "HeaderIsShared");
+ CPPUNIT_ASSERT_EQUAL(true, bHeaderIsShared);
+
+ bool bFirstIsShared = getProperty<bool>(xPageStyle, "FirstIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bFirstIsShared);
+
+ auto xHeaderTextFirst
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderTextFirst");
+ CPPUNIT_ASSERT_EQUAL(OUString("FIRST"), xHeaderTextFirst->getString());
+
+ auto xHeaderText = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderText");
+ CPPUNIT_ASSERT_EQUAL(OUString("NON-FIRST"), xHeaderText->getString());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstRestHeaderPageStyles_ODF)
+{
+ createSwDoc("SimpleFirst.odt");
+ checkFirstRestHeaderPageStyles();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstRestHeaderPageStyles_OOXML)
+{
+ createSwDoc("SimpleFirst.docx");
+ checkFirstRestHeaderPageStyles();
+}
+
+void HeaderFooterTest::checkLeftRightHeaderPageStyles()
+{
+ // Page 1
+ checkParagraph(1, "P1", "Standard");
+
+ // Page 2
+ checkParagraph(2, "P2", "Standard");
+
+ // Page 3
+ checkParagraph(3, "P3", "Standard");
+
+ // Page 4
+ checkParagraph(4, "P4", "Standard");
+
+ // Check Default Style
+ {
+ uno::Reference<beans::XPropertySet> xPageStyle(
+ getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+
+ bool bHeader = getProperty<bool>(xPageStyle, "HeaderIsOn");
+ CPPUNIT_ASSERT_EQUAL(true, bHeader);
+
+ bool bHeaderIsShared = getProperty<bool>(xPageStyle, "HeaderIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bHeaderIsShared);
+
+ bool bFirstIsShared = getProperty<bool>(xPageStyle, "FirstIsShared");
+ CPPUNIT_ASSERT_EQUAL(true, bFirstIsShared);
+
+ auto xHeaderTextLeft
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderTextLeft");
+ CPPUNIT_ASSERT_EQUAL(OUString("LEFT"), xHeaderTextLeft->getString());
+
+ auto xHeaderTextRight
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderTextRight");
+ CPPUNIT_ASSERT_EQUAL(OUString("RIGHT"), xHeaderTextRight->getString());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testLeftRightHeaderPageStyles_ODF)
+{
+ createSwDoc("SimpleLeftRight.odt");
+ checkLeftRightHeaderPageStyles();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testLeftRightHeaderPageStyles_OOXML)
+{
+ createSwDoc("SimpleLeftRight.docx");
+ checkLeftRightHeaderPageStyles();
+}
+
+void HeaderFooterTest::checkFirstLeftRightHeaderPageStyles()
+{
+ // Page 1
+ checkParagraph(1, "Para 1", "Standard");
+
+ // Page 2
+ checkParagraph(2, "Para 2", "Standard");
+
+ // Page 3
+ checkParagraph(3, "Para 3", "Standard");
+
+ // Page 4
+ checkParagraph(4, "Para 4", "Standard");
+
+ // Page 5
+ checkParagraph(5, "Para 5", "Standard");
+
+ // Check Default Style
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+
+ bool bHeader = getProperty<bool>(xPageStyle, "HeaderIsOn");
+ CPPUNIT_ASSERT_EQUAL(true, bHeader);
+
+ bool bFooter = getProperty<bool>(xPageStyle, "FooterIsOn");
+ CPPUNIT_ASSERT_EQUAL(true, bFooter);
+
+ bool bHeaderIsShared = getProperty<bool>(xPageStyle, "HeaderIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bHeaderIsShared);
+
+ bool bFooterIsShared = getProperty<bool>(xPageStyle, "FooterIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bFooterIsShared);
+
+ bool bFirstIsShared = getProperty<bool>(xPageStyle, "FirstIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bFirstIsShared);
+
+ auto xHeaderTextFirst = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderTextFirst");
+ CPPUNIT_ASSERT_EQUAL(OUString("FIRST HEADER"), xHeaderTextFirst->getString());
+
+ auto xHeaderTextLeft = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderTextLeft");
+ CPPUNIT_ASSERT_EQUAL(OUString("LEFT HEADER"), xHeaderTextLeft->getString());
+
+ auto xHeaderTextRight = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderText");
+ CPPUNIT_ASSERT_EQUAL(OUString("RIGHT HEADER"), xHeaderTextRight->getString());
+
+ auto xFooterTextFirst = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextFirst");
+ CPPUNIT_ASSERT_EQUAL(OUString("FIRST FOOTER"), xFooterTextFirst->getString());
+
+ auto xFooterTextLeft = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextLeft");
+ CPPUNIT_ASSERT_EQUAL(OUString("LEFT FOOTER"), xFooterTextLeft->getString());
+
+ auto xFooterTextRight = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterText");
+ CPPUNIT_ASSERT_EQUAL(OUString("RIGHT FOOTER"), xFooterTextRight->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstLeftRightHeaderPageStyles_ODF)
+{
+ createSwDoc("SimpleFirstLeftRight.odt");
+ checkFirstLeftRightHeaderPageStyles();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstLeftRightHeaderPageStyles_OOXML)
+{
+ createSwDoc("SimpleFirstLeftRight.docx");
+ checkFirstLeftRightHeaderPageStyles();
+}
+
+void HeaderFooterTest::checkDoubleFirstLeftRightHeaderPageStyles(
+ OUString const& rCustomPageStyleName)
+{
+ // Page 1
+ checkParagraph(1, "Para 1 - Default", "Standard");
+
+ // Page 2
+ checkParagraph(2, "Para 2 - Default", "Standard");
+
+ // Page 3
+ checkParagraph(3, "Para 3 - Default", "Standard");
+
+ // Page 4
+ checkParagraph(4, "Para 4 - Custom", rCustomPageStyleName);
+
+ // Page 5
+ checkParagraph(5, "Para 5 - Custom", rCustomPageStyleName);
+
+ // Page 6
+ checkParagraph(6, "Para 6 - Custom", rCustomPageStyleName);
+
+ // Check Default Style
+ {
+ uno::Reference<beans::XPropertySet> xPageStyle(
+ getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+
+ bool bHeader = getProperty<bool>(xPageStyle, "HeaderIsOn");
+ CPPUNIT_ASSERT_EQUAL(true, bHeader);
+
+ bool bFooter = getProperty<bool>(xPageStyle, "FooterIsOn");
+ CPPUNIT_ASSERT_EQUAL(true, bFooter);
+
+ bool bHeaderIsShared = getProperty<bool>(xPageStyle, "HeaderIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bHeaderIsShared);
+
+ bool bFooterIsShared = getProperty<bool>(xPageStyle, "FooterIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bFooterIsShared);
+
+ bool bFirstIsShared = getProperty<bool>(xPageStyle, "FirstIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bFirstIsShared);
+
+ auto xHeaderTextFirst
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderTextFirst");
+ CPPUNIT_ASSERT_EQUAL(OUString("FIRST HEADER"), xHeaderTextFirst->getString());
+
+ auto xHeaderTextLeft
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderTextLeft");
+ CPPUNIT_ASSERT_EQUAL(OUString("LEFT HEADER"), xHeaderTextLeft->getString());
+
+ auto xHeaderTextRight = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderText");
+ CPPUNIT_ASSERT_EQUAL(OUString("RIGHT HEADER"), xHeaderTextRight->getString());
+
+ auto xFooterTextFirst
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextFirst");
+ CPPUNIT_ASSERT_EQUAL(OUString("FIRST FOOTER"), xFooterTextFirst->getString());
+
+ auto xFooterTextLeft
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextLeft");
+ CPPUNIT_ASSERT_EQUAL(OUString("LEFT FOOTER"), xFooterTextLeft->getString());
+
+ auto xFooterTextRight = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterText");
+ CPPUNIT_ASSERT_EQUAL(OUString("RIGHT FOOTER"), xFooterTextRight->getString());
+ }
+
+ {
+ uno::Reference<beans::XPropertySet> xPageStyle(
+ getStyles("PageStyles")->getByName(rCustomPageStyleName), uno::UNO_QUERY);
+
+ bool bHeader = getProperty<bool>(xPageStyle, "HeaderIsOn");
+ CPPUNIT_ASSERT_EQUAL(true, bHeader);
+
+ bool bFooter = getProperty<bool>(xPageStyle, "FooterIsOn");
+ CPPUNIT_ASSERT_EQUAL(true, bFooter);
+
+ bool bHeaderIsShared = getProperty<bool>(xPageStyle, "HeaderIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bHeaderIsShared);
+
+ bool bFooterIsShared = getProperty<bool>(xPageStyle, "FooterIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bFooterIsShared);
+
+ bool bFirstIsShared = getProperty<bool>(xPageStyle, "FirstIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bFirstIsShared);
+
+ auto xHeaderTextFirst
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderTextFirst");
+ CPPUNIT_ASSERT_EQUAL(OUString("FIRST HEADER - CUSTOM"), xHeaderTextFirst->getString());
+
+ auto xHeaderTextLeft
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderTextLeft");
+ CPPUNIT_ASSERT_EQUAL(OUString("LEFT HEADER - CUSTOM"), xHeaderTextLeft->getString());
+
+ auto xHeaderTextRight = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderText");
+ CPPUNIT_ASSERT_EQUAL(OUString("RIGHT HEADER - CUSTOM"), xHeaderTextRight->getString());
+
+ auto xFooterTextFirst
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextFirst");
+ CPPUNIT_ASSERT_EQUAL(OUString("FIRST FOOTER - CUSTOM"), xFooterTextFirst->getString());
+
+ auto xFooterTextLeft
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterTextLeft");
+ CPPUNIT_ASSERT_EQUAL(OUString("LEFT FOOTER - CUSTOM"), xFooterTextLeft->getString());
+
+ auto xFooterTextRight = getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterText");
+ CPPUNIT_ASSERT_EQUAL(OUString("RIGHT FOOTER - CUSTOM"), xFooterTextRight->getString());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testDoubleFirstLeftRightHeaderPageStyles_ODF)
+{
+ createSwDoc("DoubleFirstLeftRight.odt");
+ checkDoubleFirstLeftRightHeaderPageStyles("Custom Page Style");
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testDoubleFirstLeftRightHeaderPageStyles_OOXML)
+{
+ createSwDoc("DoubleFirstLeftRight.docx");
+ checkDoubleFirstLeftRightHeaderPageStyles("Converted1");
+}
+
+void HeaderFooterTest::checkShapeInFirstPageHeader()
+{
+ // Check Default Style
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+
+ bool bHeader = getProperty<bool>(xPageStyle, "HeaderIsOn");
+ CPPUNIT_ASSERT_EQUAL(true, bHeader);
+
+ bool bFooter = getProperty<bool>(xPageStyle, "FooterIsOn");
+ CPPUNIT_ASSERT_EQUAL(false, bFooter);
+
+ bool bHeaderIsShared = getProperty<bool>(xPageStyle, "HeaderIsShared");
+ CPPUNIT_ASSERT_EQUAL(true, bHeaderIsShared);
+
+ bool bFirstIsShared = getProperty<bool>(xPageStyle, "FirstIsShared");
+ CPPUNIT_ASSERT_EQUAL(false, bFirstIsShared);
+
+ // Check shape is anchored to paragraph belonging to XText from "HeaderTextFirst" property
+ auto xHeaderTextFirst = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderTextFirst");
+ CPPUNIT_ASSERT(xHeaderTextFirst.is());
+
+ uno::Reference<text::XTextContent> xShapeText(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShapeText.is());
+ uno::Reference<text::XTextRange> xAnchor = xShapeText->getAnchor();
+ CPPUNIT_ASSERT(xAnchor.is());
+
+ CPPUNIT_ASSERT_EQUAL(xHeaderTextFirst, xAnchor->getText());
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstPageHeaderShape_ODF)
+{
+ createSwDoc("FirstPageHeaderShape.odt");
+ checkShapeInFirstPageHeader();
+}
+
+CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testFirstPageHeaderShape_OOXML)
+{
+ createSwDoc("FirstPageHeaderShape.docx");
+ checkShapeInFirstPageHeader();
+}
+
+} // end anonymous namespace
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/header_footer/data/DoubleFirstLeftRight.docx b/sw/qa/core/header_footer/data/DoubleFirstLeftRight.docx
new file mode 100644
index 000000000000..307567507d2e
--- /dev/null
+++ b/sw/qa/core/header_footer/data/DoubleFirstLeftRight.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/DoubleFirstLeftRight.odt b/sw/qa/core/header_footer/data/DoubleFirstLeftRight.odt
new file mode 100644
index 000000000000..3bef1c87b655
--- /dev/null
+++ b/sw/qa/core/header_footer/data/DoubleFirstLeftRight.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/FirstPageHeaderShape.docx b/sw/qa/core/header_footer/data/FirstPageHeaderShape.docx
new file mode 100644
index 000000000000..baed4b215ec1
--- /dev/null
+++ b/sw/qa/core/header_footer/data/FirstPageHeaderShape.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/FirstPageHeaderShape.odt b/sw/qa/core/header_footer/data/FirstPageHeaderShape.odt
new file mode 100644
index 000000000000..7053423d000d
--- /dev/null
+++ b/sw/qa/core/header_footer/data/FirstPageHeaderShape.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/SimpleFirst.docx b/sw/qa/core/header_footer/data/SimpleFirst.docx
new file mode 100644
index 000000000000..1641a2d084ed
--- /dev/null
+++ b/sw/qa/core/header_footer/data/SimpleFirst.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/SimpleFirst.odt b/sw/qa/core/header_footer/data/SimpleFirst.odt
new file mode 100644
index 000000000000..fc165e966f85
--- /dev/null
+++ b/sw/qa/core/header_footer/data/SimpleFirst.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/SimpleFirstLeftRight.docx b/sw/qa/core/header_footer/data/SimpleFirstLeftRight.docx
new file mode 100644
index 000000000000..d0a8ed02e868
--- /dev/null
+++ b/sw/qa/core/header_footer/data/SimpleFirstLeftRight.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/SimpleFirstLeftRight.odt b/sw/qa/core/header_footer/data/SimpleFirstLeftRight.odt
new file mode 100644
index 000000000000..a16cc922fc9f
--- /dev/null
+++ b/sw/qa/core/header_footer/data/SimpleFirstLeftRight.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/SimpleLeftRight.docx b/sw/qa/core/header_footer/data/SimpleLeftRight.docx
new file mode 100644
index 000000000000..80dbda0420d7
--- /dev/null
+++ b/sw/qa/core/header_footer/data/SimpleLeftRight.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/SimpleLeftRight.odt b/sw/qa/core/header_footer/data/SimpleLeftRight.odt
new file mode 100644
index 000000000000..61302944da30
--- /dev/null
+++ b/sw/qa/core/header_footer/data/SimpleLeftRight.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/TestFirstFooterDisabled.docx b/sw/qa/core/header_footer/data/TestFirstFooterDisabled.docx
new file mode 100644
index 000000000000..2fe9a176689b
--- /dev/null
+++ b/sw/qa/core/header_footer/data/TestFirstFooterDisabled.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/TestPageStyleOnlyLeft.docx b/sw/qa/core/header_footer/data/TestPageStyleOnlyLeft.docx
new file mode 100644
index 000000000000..4714b8e27f87
--- /dev/null
+++ b/sw/qa/core/header_footer/data/TestPageStyleOnlyLeft.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/bnc519228_odd-breaksB.docx b/sw/qa/core/header_footer/data/bnc519228_odd-breaksB.docx
new file mode 100644
index 000000000000..674d71401110
--- /dev/null
+++ b/sw/qa/core/header_footer/data/bnc519228_odd-breaksB.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/bnc875718.docx b/sw/qa/core/header_footer/data/bnc875718.docx
new file mode 100644
index 000000000000..878a46fdf912
--- /dev/null
+++ b/sw/qa/core/header_footer/data/bnc875718.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/bnc884615-mso-position.docx b/sw/qa/core/header_footer/data/bnc884615-mso-position.docx
new file mode 100644
index 000000000000..2fb28ecfb3fd
--- /dev/null
+++ b/sw/qa/core/header_footer/data/bnc884615-mso-position.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/cont-sect-break-header-footer.docx b/sw/qa/core/header_footer/data/cont-sect-break-header-footer.docx
new file mode 100644
index 000000000000..61c18298d083
--- /dev/null
+++ b/sw/qa/core/header_footer/data/cont-sect-break-header-footer.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/fdo64238_a.docx b/sw/qa/core/header_footer/data/fdo64238_a.docx
new file mode 100644
index 000000000000..7c43feaf75a7
--- /dev/null
+++ b/sw/qa/core/header_footer/data/fdo64238_a.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/fdo64238_b.docx b/sw/qa/core/header_footer/data/fdo64238_b.docx
new file mode 100644
index 000000000000..bfaf92cca2fc
--- /dev/null
+++ b/sw/qa/core/header_footer/data/fdo64238_b.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/fdo65655.docx b/sw/qa/core/header_footer/data/fdo65655.docx
new file mode 100644
index 000000000000..5fe9451bb091
--- /dev/null
+++ b/sw/qa/core/header_footer/data/fdo65655.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/fdo66145.docx b/sw/qa/core/header_footer/data/fdo66145.docx
new file mode 100644
index 000000000000..62ffdbe22e98
--- /dev/null
+++ b/sw/qa/core/header_footer/data/fdo66145.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/first-header-footer.doc b/sw/qa/core/header_footer/data/first-header-footer.doc
new file mode 100644
index 000000000000..023c494862a5
--- /dev/null
+++ b/sw/qa/core/header_footer/data/first-header-footer.doc
Binary files differ
diff --git a/sw/qa/core/header_footer/data/first-header-footer.docx b/sw/qa/core/header_footer/data/first-header-footer.docx
new file mode 100644
index 000000000000..d18eea5866b5
--- /dev/null
+++ b/sw/qa/core/header_footer/data/first-header-footer.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/first-header-footer.odt b/sw/qa/core/header_footer/data/first-header-footer.odt
new file mode 100644
index 000000000000..2ed6b740a102
--- /dev/null
+++ b/sw/qa/core/header_footer/data/first-header-footer.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/first-header-footerB.odt b/sw/qa/core/header_footer/data/first-header-footerB.odt
new file mode 100644
index 000000000000..0ae1992ed7e1
--- /dev/null
+++ b/sw/qa/core/header_footer/data/first-header-footerB.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/headerfooter-link-to-prev.docx b/sw/qa/core/header_footer/data/headerfooter-link-to-prev.docx
new file mode 100644
index 000000000000..cc4ddc89bb9b
--- /dev/null
+++ b/sw/qa/core/header_footer/data/headerfooter-link-to-prev.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/n750935.docx b/sw/qa/core/header_footer/data/n750935.docx
new file mode 100644
index 000000000000..0dd01592dd65
--- /dev/null
+++ b/sw/qa/core/header_footer/data/n750935.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf112694.docx b/sw/qa/core/header_footer/data/tdf112694.docx
new file mode 100644
index 000000000000..f629a388e3cb
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf112694.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf113849_evenAndOddHeaders.odt b/sw/qa/core/header_footer/data/tdf113849_evenAndOddHeaders.odt
new file mode 100644
index 000000000000..d9aa0ae23541
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf113849_evenAndOddHeaders.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf118393.odt b/sw/qa/core/header_footer/data/tdf118393.odt
new file mode 100644
index 000000000000..ff8d5400950b
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf118393.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf127778.docx b/sw/qa/core/header_footer/data/tdf127778.docx
new file mode 100644
index 000000000000..a706d575763f
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf127778.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf129582.docx b/sw/qa/core/header_footer/data/tdf129582.docx
new file mode 100644
index 000000000000..d160262ae745
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf129582.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf135216_evenOddFooter.docx b/sw/qa/core/header_footer/data/tdf135216_evenOddFooter.docx
new file mode 100644
index 000000000000..05840f984827
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf135216_evenOddFooter.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf135216_evenOddFooter.odt b/sw/qa/core/header_footer/data/tdf135216_evenOddFooter.odt
new file mode 100644
index 000000000000..ab0ac591e29a
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf135216_evenOddFooter.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf145998_firstHeader.odt b/sw/qa/core/header_footer/data/tdf145998_firstHeader.odt
new file mode 100644
index 000000000000..ad5e4c3e0320
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf145998_firstHeader.odt
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf57155.docx b/sw/qa/core/header_footer/data/tdf57155.docx
new file mode 100644
index 000000000000..5cca9b3ea9a2
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf57155.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf69635.docx b/sw/qa/core/header_footer/data/tdf69635.docx
new file mode 100644
index 000000000000..94cced4d2ae4
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf69635.docx
Binary files differ
diff --git a/sw/qa/core/header_footer/data/tdf79639.docx b/sw/qa/core/header_footer/data/tdf79639.docx
new file mode 100644
index 000000000000..b84aaea70389
--- /dev/null
+++ b/sw/qa/core/header_footer/data/tdf79639.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/bad-split-section.odt b/sw/qa/core/layout/data/bad-split-section.odt
new file mode 100644
index 000000000000..6dbd07802dfd
--- /dev/null
+++ b/sw/qa/core/layout/data/bad-split-section.odt
Binary files differ
diff --git a/sw/qa/core/layout/data/birt_min.odt b/sw/qa/core/layout/data/birt_min.odt
new file mode 100644
index 000000000000..91193644c2f0
--- /dev/null
+++ b/sw/qa/core/layout/data/birt_min.odt
Binary files differ
diff --git a/sw/qa/core/layout/data/bullet.png b/sw/qa/core/layout/data/bullet.png
new file mode 100644
index 000000000000..4e2dcf414919
--- /dev/null
+++ b/sw/qa/core/layout/data/bullet.png
Binary files differ
diff --git a/sw/qa/core/layout/data/double-border-horizontal.docx b/sw/qa/core/layout/data/double-border-horizontal.docx
new file mode 100644
index 000000000000..624c7aa1aa74
--- /dev/null
+++ b/sw/qa/core/layout/data/double-border-horizontal.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/double-border-vertical.docx b/sw/qa/core/layout/data/double-border-vertical.docx
new file mode 100644
index 000000000000..a4731ebec612
--- /dev/null
+++ b/sw/qa/core/layout/data/double-border-vertical.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/double-page-border.docx b/sw/qa/core/layout/data/double-page-border.docx
new file mode 100644
index 000000000000..a706b327cd05
--- /dev/null
+++ b/sw/qa/core/layout/data/double-page-border.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-2cols.docx b/sw/qa/core/layout/data/floattable-2cols.docx
new file mode 100644
index 000000000000..b55bc8dd49b8
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-2cols.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-3pages.docx b/sw/qa/core/layout/data/floattable-3pages.docx
new file mode 100644
index 000000000000..d6cbdafc1945
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-3pages.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-anchor-keep-with-next.docx b/sw/qa/core/layout/data/floattable-anchor-keep-with-next.docx
new file mode 100644
index 000000000000..a0930900d884
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-anchor-keep-with-next.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-compat14-body.docx b/sw/qa/core/layout/data/floattable-compat14-body.docx
new file mode 100644
index 000000000000..fc25b867afc9
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-compat14-body.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-compat14-nosplit.docx b/sw/qa/core/layout/data/floattable-compat14-nosplit.docx
new file mode 100644
index 000000000000..bd3f09c69e65
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-compat14-nosplit.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-compat14.docx b/sw/qa/core/layout/data/floattable-compat14.docx
new file mode 100644
index 000000000000..19221609ddee
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-compat14.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-del-empty.docx b/sw/qa/core/layout/data/floattable-del-empty.docx
new file mode 100644
index 000000000000..340d06b6222b
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-del-empty.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-deleted-anchor.docx b/sw/qa/core/layout/data/floattable-deleted-anchor.docx
new file mode 100644
index 000000000000..cab5b68ff94d
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-deleted-anchor.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-footer-2rows.docx b/sw/qa/core/layout/data/floattable-footer-2rows.docx
new file mode 100644
index 000000000000..0d3db047c125
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-footer-2rows.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-footer.docx b/sw/qa/core/layout/data/floattable-footer.docx
new file mode 100644
index 000000000000..731e4fdb23a5
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-footer.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-from-bottom.docx b/sw/qa/core/layout/data/floattable-from-bottom.docx
new file mode 100644
index 000000000000..86374a68ba27
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-from-bottom.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-header.docx b/sw/qa/core/layout/data/floattable-header.docx
new file mode 100644
index 000000000000..baddd365ce37
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-header.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-hori-pos.docx b/sw/qa/core/layout/data/floattable-hori-pos.docx
new file mode 100644
index 000000000000..7a5e033a4928
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-hori-pos.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-in-inlinetable.docx b/sw/qa/core/layout/data/floattable-in-inlinetable.docx
new file mode 100644
index 000000000000..56505316cd8e
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-in-inlinetable.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-in-inltbl-in-sect.docx b/sw/qa/core/layout/data/floattable-in-inltbl-in-sect.docx
new file mode 100644
index 000000000000..ff329ecb5a5f
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-in-inltbl-in-sect.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-in-section.docx b/sw/qa/core/layout/data/floattable-in-section.docx
new file mode 100644
index 000000000000..9aab264867f0
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-in-section.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-in-text-section.docx b/sw/qa/core/layout/data/floattable-in-text-section.docx
new file mode 100644
index 000000000000..5b377dd0379f
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-in-text-section.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-model-position-for-view-point-correction.docx b/sw/qa/core/layout/data/floattable-model-position-for-view-point-correction.docx
new file mode 100644
index 000000000000..1de36c6e0c1f
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-model-position-for-view-point-correction.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-move-master.docx b/sw/qa/core/layout/data/floattable-move-master.docx
new file mode 100644
index 000000000000..03087eb358a8
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-move-master.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-multi-col.docx b/sw/qa/core/layout/data/floattable-multi-col.docx
new file mode 100644
index 000000000000..10e63bad39f0
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-multi-col.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-negative-height.docx b/sw/qa/core/layout/data/floattable-negative-height.docx
new file mode 100644
index 000000000000..e5b6cd510300
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-negative-height.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-nested-overlap.odt b/sw/qa/core/layout/data/floattable-nested-overlap.odt
new file mode 100644
index 000000000000..b90ae9a7b01e
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-nested-overlap.odt
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-nested-rowspan.docx b/sw/qa/core/layout/data/floattable-nested-rowspan.docx
new file mode 100644
index 000000000000..48cbdbfe59c3
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-nested-rowspan.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-nested.odt b/sw/qa/core/layout/data/floattable-nested.odt
new file mode 100644
index 000000000000..3d21314f5871
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-nested.odt
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-next-leaf-in-section.docx b/sw/qa/core/layout/data/floattable-next-leaf-in-section.docx
new file mode 100644
index 000000000000..3a315d51c984
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-next-leaf-in-section.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-next-row-invalidate-pos.docx b/sw/qa/core/layout/data/floattable-next-row-invalidate-pos.docx
new file mode 100644
index 000000000000..bbc7114b8e20
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-next-row-invalidate-pos.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-no-footer-overlap.doc b/sw/qa/core/layout/data/floattable-no-footer-overlap.doc
new file mode 100644
index 000000000000..87e301189df5
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-no-footer-overlap.doc
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-nomargins.docx b/sw/qa/core/layout/data/floattable-nomargins.docx
new file mode 100644
index 000000000000..642010e0f356
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-nomargins.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-not-wrapped-by-table.docx b/sw/qa/core/layout/data/floattable-not-wrapped-by-table.docx
new file mode 100644
index 000000000000..2c255148d351
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-not-wrapped-by-table.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-object-formatter.docx b/sw/qa/core/layout/data/floattable-object-formatter.docx
new file mode 100644
index 000000000000..2582af0eb863
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-object-formatter.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-rowsplit.docx b/sw/qa/core/layout/data/floattable-rowsplit.docx
new file mode 100644
index 000000000000..8e1e9fb30184
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-rowsplit.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-tab-join-legacy.docx b/sw/qa/core/layout/data/floattable-tab-join-legacy.docx
new file mode 100644
index 000000000000..f4056bf21f5c
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-tab-join-legacy.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-tab-join.docx b/sw/qa/core/layout/data/floattable-tab-join.docx
new file mode 100644
index 000000000000..cb1990c2a8ea
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-tab-join.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-table-join.docx b/sw/qa/core/layout/data/floattable-table-join.docx
new file mode 100644
index 000000000000..807b4cfa8c11
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-table-join.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-table-row-keep.docx b/sw/qa/core/layout/data/floattable-table-row-keep.docx
new file mode 100644
index 000000000000..c7edcc033407
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-table-row-keep.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-then-table.doc b/sw/qa/core/layout/data/floattable-then-table.doc
new file mode 100644
index 000000000000..8c9684e5950a
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-then-table.doc
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-then-table.docx b/sw/qa/core/layout/data/floattable-then-table.docx
new file mode 100644
index 000000000000..eb06507bd8bb
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-then-table.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-vertoffset.docx b/sw/qa/core/layout/data/floattable-vertoffset.docx
new file mode 100644
index 000000000000..d71a587f9c1e
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-vertoffset.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-widow.docx b/sw/qa/core/layout/data/floattable-widow.docx
new file mode 100644
index 000000000000..c3f17e6cd9ed
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-widow.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-wrap-on-all-pages.docx b/sw/qa/core/layout/data/floattable-wrap-on-all-pages.docx
new file mode 100644
index 000000000000..39642002bbed
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-wrap-on-all-pages.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-wrapped-by-table-nested.docx b/sw/qa/core/layout/data/floattable-wrapped-by-table-nested.docx
new file mode 100644
index 000000000000..d6950a6c8e04
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-wrapped-by-table-nested.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable-wrapped-by-table.docx b/sw/qa/core/layout/data/floattable-wrapped-by-table.docx
new file mode 100644
index 000000000000..a53f652183ea
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable-wrapped-by-table.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/floattable.docx b/sw/qa/core/layout/data/floattable.docx
new file mode 100644
index 000000000000..ee1b029882dd
--- /dev/null
+++ b/sw/qa/core/layout/data/floattable.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/header-textbox.docx b/sw/qa/core/layout/data/header-textbox.docx
new file mode 100644
index 000000000000..4df72cccd3e7
--- /dev/null
+++ b/sw/qa/core/layout/data/header-textbox.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/inner-border.docx b/sw/qa/core/layout/data/inner-border.docx
new file mode 100644
index 000000000000..1d8adc9fe818
--- /dev/null
+++ b/sw/qa/core/layout/data/inner-border.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/linked-bullet.odt b/sw/qa/core/layout/data/linked-bullet.odt
new file mode 100644
index 000000000000..ae165531abba
--- /dev/null
+++ b/sw/qa/core/layout/data/linked-bullet.odt
Binary files differ
diff --git a/sw/qa/core/layout/data/page-remove-fly-no-table.fodt b/sw/qa/core/layout/data/page-remove-fly-no-table.fodt
new file mode 100644
index 000000000000..035688b85b41
--- /dev/null
+++ b/sw/qa/core/layout/data/page-remove-fly-no-table.fodt
@@ -0,0 +1,460 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:writing-mode="lr-tb" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" loext:color-lum-mod="100%" loext:color-lum-off="0%" style:font-name="Liberation Sans" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit 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="lr-tb"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Sans" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" 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" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="no-limit" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:default-outline-level="" style:class="text" style:master-page-name="">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0.25cm" style:contextual-spacing="false" fo:line-height="120%" fo:text-align="start" style:justify-single-word="false" fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="auto" style:punctuation-wrap="simple" style:writing-mode="lr-tb"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-family-generic="swiss" fo:font-size="10.5pt" fo:letter-spacing="0.014cm" style:letter-kerning="true" style:font-name-asian="Noto Sans CJK SC Regular" style:font-family-asian="'Noto Sans CJK SC Regular'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="FreeSans" style:font-family-complex="FreeSans" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="true" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="no-limit" loext:hyphenation-zone="no-limit"/>
+ </style:style>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:default-outline-level="" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-family-generic="swiss" fo:font-size="14pt" style:font-name-asian="Noto Sans CJK SC Regular" style:font-family-asian="'Noto Sans CJK SC Regular'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="FreeSans" style:font-family-complex="FreeSans" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </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:master-page-name="">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.353cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-together="always" fo:orphans="0" fo:widows="0" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="auto"/>
+ <style:text-properties fo:font-size="16pt" fo:font-weight="bold" style:font-size-asian="16pt" style:font-weight-asian="bold" style:font-size-complex="16pt" style:font-weight-complex="normal"/>
+ </style:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:default-outline-level="" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.101cm" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.247cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
+ <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="600"/>
+ </style:style>
+ <style:style style:name="Heading_20_4" style:display-name="Heading 4" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="4" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false"/>
+ <style:text-properties fo:font-size="13pt" fo:font-style="normal" fo:font-weight="bold" style:font-size-asian="13.5pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="13.5pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Contents_20_Heading" style:display-name="Contents Heading" style:family="paragraph" style:parent-style-name="Heading" style:class="index">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0.101cm" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="13pt" fo:font-weight="bold" style:font-size-asian="16pt" style:font-weight-asian="bold" style:font-size-complex="16pt" style:font-weight-complex="600"/>
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="17cm" table:align="margins" style:may-break-between-rows="true" style:writing-mode="lr-tb" table:border-model="collapsing"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="17cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="always"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent" fo:padding="0.097cm" fo:border="none" style:writing-mode="lr-tb">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties style:width="17cm" fo:margin-top="0cm" fo:margin-bottom="0.3cm" table:align="margins" style:may-break-between-rows="true" style:writing-mode="lr-tb" table:border-model="collapsing"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="17cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table2.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="always"/>
+ </style:style>
+ <style:style style:name="Table2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent" fo:padding="0.097cm" fo:border="none" style:writing-mode="lr-tb">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table3" style:family="table">
+ <style:table-properties style:width="8.251cm" fo:margin-top="0cm" fo:margin-bottom="0.3cm" table:align="margins" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="Table3.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.251cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table3.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect2" style:family="section">
+ <style:section-properties fo:margin-left="0cm" fo:margin-right="0cm" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect3" style:family="section">
+ <style:section-properties text:dont-balance-text-columns="false" style:editable="false">
+ <style:columns fo:column-count="2" fo:column-gap="0.497cm">
+ <style:column style:rel-width="32767*" fo:start-indent="0cm" fo:end-indent="0.248cm"/>
+ <style:column style:rel-width="32768*" fo:start-indent="0.248cm" 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.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="23" style:layout-grid-base-height="1.058cm" 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.704cm" style:layout-grid-snap-to="true" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="0.998cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.9cm" style:dynamic-spacing="true"/>
+ </style:footer-style>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="44" style:layout-grid-base-height="0.55cm" style:layout-grid-ruby-height="0cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:layout-grid-base-width="0.37cm" style:layout-grid-snap-to="true" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="0.998cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.9cm" style:dynamic-spacing="true"/>
+ </style:footer-style>
+ </style:page-layout>
+ <style:page-layout style:name="pm3">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="1.27cm" fo:margin-left="3.175cm" fo:margin-right="3.175cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="22860" style:layout-grid-base-height="0.176cm" style:layout-grid-ruby-height="0cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:layout-grid-base-width="0.37cm" style:layout-grid-snap-to="true" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="1.27cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="1.169cm" style:dynamic-spacing="true"/>
+ </style:footer-style>
+ </style:page-layout>
+ <style:page-layout style:name="pm4">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1cm" fo:margin-bottom="1cm" fo:margin-left="2cm" fo:margin-right="1cm" style:writing-mode="lr-tb" style: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:layout-grid-base-width="0.706cm" style:layout-grid-snap-to="true" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1">
+ <style:footer>
+ <text:p/>
+ </style:footer>
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <text:p text:style-name="P6">2022-04-24_Quirk<text:span text:style-name="T2">s</text:span> in the focusing property of the Navigator</text:p>
+ <text:p text:style-name="P10">This example file shows several bugs. It was written as an example to #148755. But I also recorded all other surprising things in order to report them on separate bug reports. Don’t mind if they appear here, it is just just to catch some of them in order to report them.</text:p>
+ <text:p text:style-name="P10">This report was written with </text:p>
+ <text:p text:style-name="P11">Version: 7.4.0.0.alpha0+ / LibreOffice Community<text:line-break/>Build ID: f775b625b497b4fa6731bddd433916dde52fbb2e<text:line-break/>CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3<text:line-break/>Locale: de-DE (de_DE.UTF-8); UI: en-US<text:line-break/>Calc: threaded</text:p>
+ <text:p text:style-name="P12">but I have seen some of these glitches also in other versions of LO Writer!</text:p>
+ <text:table-of-content text:style-name="Sect1" text:protected="true" text:name="Table of Contents1">
+ <text:table-of-content-source text:outline-level="10">
+ <text:index-title-template text:style-name="Contents_20_Heading">Table of Contents</text:index-title-template>
+ <text:table-of-content-entry-template text:outline-level="1" text:style-name="Contents_20_1">
+ <text:index-entry-link-start text:style-name="Index_20_Link"/>
+ <text:index-entry-chapter/>
+ <text:index-entry-text/>
+ <text:index-entry-tab-stop style:type="right" style:leader-char="."/>
+ <text:index-entry-page-number/>
+ <text:index-entry-link-end/>
+ </text:table-of-content-entry-template>
+ </text:table-of-content-source>
+ <text:index-body>
+ <text:index-title text:style-name="Sect1" text:name="Table of Contents1_Head">
+ <text:p text:style-name="Contents_20_Heading">Table of Contents</text:p>
+ </text:index-title>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ </text:index-body>
+ </text:table-of-content>
+ <text:p/>
+ <text:h text:style-name="P19" text:outline-level="2"><text:bookmark-start text:name="__RefHeading___Toc71113_2824860697"/>Original Post <text:span text:style-name="T5">#148755</text:span><text:bookmark-end text:name="__RefHeading___Toc71113_2824860697"/></text:h>
+ <text:h text:style-name="P22" text:outline-level="3"><text:bookmark-start text:name="__RefHeading___Toc71115_2824860697"/><text:span text:style-name="T5">P</text:span>receding events<text:bookmark-end text:name="__RefHeading___Toc71115_2824860697"/></text:h>
+ <text:p/>
+ <text:section text:style-name="Sect2" text:name="c0">
+ <text:h text:style-name="P22" text:outline-level="3"><text:bookmark-start text:name="__RefHeading___Toc71117_2824860697"/>New findings<text:bookmark-end text:name="__RefHeading___Toc71117_2824860697"/></text:h>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p text:style-name="P4">Sometimes I use tables because they make the location of inserted images more predictable than if I insert them into the text (e.g. anchored to paragraphs). If - as e.g. often in user manuals - many short text passages and corresponding illustrations follow one after another, it may even make sense to place headings in tables as well. If you do this, however, you lose the nice feature of the navigator that you can continuously see how a text is positioned in the hierarchy of associated headings: The navigator suddenly shows the position in the hierarchy of tables (or sections, if the text passage is in a section).</text:p>
+ <text:h text:style-name="P22" text:outline-level="3"><text:bookmark-start text:name="__RefHeading___Toc71119_2824860697"/>Expected behavior:<text:bookmark-end text:name="__RefHeading___Toc71119_2824860697"/></text:h>
+ <text:p text:style-name="P18">I expect the navigator to always show the location of the bookmark in the editing window with respect to the category selected in the navigator's drop-down list of categories at the top left (really useful there are headings, tables, maybe sections. For hyperlinks, I can only imagine that it might make sense to highlight the next hyperlink before the position of the bookmark in the editing window).</text:p>
+ </text:section>
+ <text:h text:style-name="P20" text:outline-level="2"><text:bookmark-start text:name="__RefHeading___Toc71121_2824860697"/>An example<text:bookmark-end text:name="__RefHeading___Toc71121_2824860697"/></text:h>
+ <text:p text:style-name="P3">In order to demonstrate the to be shown behavior, I add some headlines such that navigator really has some structure to show. Then I also add the original post, but this time arranged in a table:</text:p>
+ <text:h text:style-name="P21" text:outline-level="2"><text:bookmark-start text:name="__RefHeading___Toc71123_2824860697"/>Original Post <text:span text:style-name="T5">#148755 in a table</text:span><text:bookmark-end text:name="__RefHeading___Toc71123_2824860697"/></text:h>
+ <table:table table:name="Table1" table:style-name="Table1" table:template-name="Standardtabelle">
+ <table:table-column table:style-name="Table1.A"/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="__RefHeading___Toc71125_2824860697"/><text:span text:style-name="T5">P</text:span>receding events<text:span text:style-name="T5"> in a table</text:span><text:bookmark-end text:name="__RefHeading___Toc71125_2824860697"/></text:h>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="Text_20_body">End of June 2021 I first observed that the Navigator adjusts itself to the proper headline associated to the current editing position. The item belonging to the edit position in the Edit window gets highlighted. That's something which has long been missing and which is very useful.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="__RefHeading___Toc71127_2824860697"/>New findings<text:span text:style-name="T5"> in a table</text:span><text:bookmark-end text:name="__RefHeading___Toc71127_2824860697"/></text:h>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="Text_20_body">Now I found something inconsistent with that: If the edit position in the edit window is in a table, the highlight moves to the relevant entry in the Tables category, if it is in a section, the highlight jumps to the proper entry in the Sections category.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <text:soft-page-break/>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="Text_20_body">When writing a larger document, the main hierarchy of things is by headline order. Being able to associate some place in the document to the surrounding headlines hierarchy is the main concern. Only in very special cases one might want to locate an image in the list of all images or a table in the list of all tables and so on.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="Text_20_body">Locating something in another category than the one highlighted (Headings/Images/Sections/Table, ..., topmost drop-down setting of Navigator) is not meaningful, especially jumping to sections instead of headlines is bizarre.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="Text_20_body">Sometimes I use tables because they make the location of inserted images more predictable than if I insert them into the text (e.g. anchored to paragraphs). If - as e.g. often in user manuals - many short text passages and corresponding illustrations follow one after another, it may even make sense to place headings in tables as well. If you do this, however, you lose the nice feature of the navigator that you can continuously see how a text is positioned in the hierarchy of associated headings: The navigator suddenly shows the position in the hierarchy of tables (or sections, if the text passage is in a section).</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="__RefHeading___Toc71129_2824860697"/>Expected behavior<text:span text:style-name="T5"> in a table</text:span>:<text:bookmark-end text:name="__RefHeading___Toc71129_2824860697"/></text:h>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="Text_20_body">I expect the navigator to always show the location of the bookmark in the editing window with respect to the category selected in the navigator's drop-down list of categories at the top left (really useful there are headings, tables, maybe sections. For hyperlinks, I can only imagine that it might make sense to highlight the next hyperlink before the position of the bookmark in the editing window).</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:h text:style-name="P20" text:outline-level="2"><text:bookmark-start text:name="__RefHeading___Toc71131_2824860697"/>Some screenshots demonstrating what goes wrong<text:bookmark-end text:name="__RefHeading___Toc71131_2824860697"/></text:h>
+ <table:table table:name="Table2" table:style-name="Table2" table:template-name="Standardtabelle">
+ <table:table-column table:style-name="Table2.A"/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="__RefHeading___Toc72157_2824860697"/>What goes right<text:bookmark-end text:name="__RefHeading___Toc72157_2824860697"/></text:h>
+ <text:p text:style-name="Text_20_body">Before I’ll show what goes wrong, I’ll precede my examples with one showing that Navigator’s reflection of edit places goes right, as long as one navigates in text which is not part of a table <text:span text:style-name="T7">(or a section, which we will encounter soon)</text:span>: I go some lines up, add the word HERE to some place and make a screenshot:</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <text:soft-page-break/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Text_20_body"><draw:frame draw:style-name="fr2" draw:name="Image3" text:anchor-type="char" svg:width="16.806cm" svg:height="10.834cm" draw:z-index="2"><draw:image draw:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+/878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+AABJRU5ErkJggg==</office:binary-data></draw:image></draw:frame>The highlighted word HERE is in the paragraph with headline “An example“: the right paragraph is highlighted in the <text:span text:style-name="T7">N</text:span>avigator. That’s <text:span text:style-name="T7">re</text:span>ally helpful. In order to show that this is not just an accidental r<text:span text:style-name="T7">e</text:span>sult, I’ll remove the highlighted word and transplant it to some other paragraph:</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <text:soft-page-break/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Text_20_body"><draw:frame draw:style-name="fr1" draw:name="Image4" text:anchor-type="paragraph" svg:width="16.806cm" svg:height="10.834cm" draw:z-index="3"><draw:image draw:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+/878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+AABJRU5ErkJggg==</office:binary-data></draw:image></draw:frame>Again the highlighted portion in the Navigator shows the position in the edit window. Now I’ll test it with yet another place.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="__RefHeading___Toc72159_2824860697"/>But this one will go wrong:<text:bookmark-end text:name="__RefHeading___Toc72159_2824860697"/></text:h>
+ </table:table-cell>
+ </table:table-row>
+ <text:soft-page-break/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_4" text:outline-level="4"><draw:frame draw:style-name="fr1" draw:name="Image5" text:anchor-type="paragraph" svg:width="16.806cm" svg:height="10.834cm" draw:z-index="4"><draw:image draw:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+/878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+AABJRU5ErkJggg==</office:binary-data></draw:image></draw:frame><text:bookmark-start text:name="__RefHeading___Toc72161_2824860697"/>1. Expec<text:span text:style-name="T7">t</text:span>ed result<text:bookmark-end text:name="__RefHeading___Toc72161_2824860697"/></text:h>
+ <text:p text:style-name="Text_20_body">This time, the highlight is in section c0! This is really surprising! I have not created any section c0 active at all. Even when LO Writer created one for internal organizational reasons: my text is under the heading “New findingsâ€!</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="__RefHeading___Toc72673_2824860697"/>Continued examples<text:bookmark-end text:name="__RefHeading___Toc72673_2824860697"/></text:h>
+ <text:p text:style-name="Text_20_body">In order to avoid any difficulty of pasted screenshots appearing on arbitrary places (another bug, but not the issue of this error report, I place all my text and screenshots to just another table: In the next picture, you see the navigator when the focus in the text field is HERE</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <text:soft-page-break/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Text_20_body"><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="paragraph" svg:width="16.806cm" svg:height="10.834cm" draw:z-index="0"><draw:image draw:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+/878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+AABJRU5ErkJggg==</office:binary-data></draw:image></draw:frame>As you see, Table2 under Tables is highlighted. You might argue, ok, the focus is really in Table2, just go to Headings in Navigator. I’ll do that now:</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <text:soft-page-break/>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Text_20_body"><draw:frame draw:style-name="fr2" draw:name="Image2" text:anchor-type="char" svg:width="16.806cm" svg:height="10.834cm" draw:z-index="1"><draw:image draw:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+/878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+AABJRU5ErkJggg==</office:binary-data></draw:image></draw:frame>but as soon as I continue writing in the text area, Table2 is highlighted again!</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="Table2.1">
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_4" text:outline-level="4"><text:bookmark-start text:name="__RefHeading___Toc71133_2824860697"/><text:span text:style-name="T6">2</text:span>. Expected behavior<text:bookmark-end text:name="__RefHeading___Toc71133_2824860697"/></text:h>
+ <text:p text:style-name="Text_20_body"><text:span text:style-name="T9">If the focus in Navigator is on Headings, it should not jump to tables when I continue to edit text which is in a table</text:span>.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:section text:style-name="Sect3" text:name="section 2">
+ <text:h text:style-name="Heading_20_3" text:outline-level="3"><text:bookmark-start text:name="__RefHeading___Toc74207_2824860697"/>Now I create a section<text:bookmark-end text:name="__RefHeading___Toc74207_2824860697"/></text:h>
+ <table:table table:name="Table3" table:style-name="Table3">
+ <table:table-column table:style-name="Table3.A"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:p text:style-name="P14">To make it appear differently, I make it a two column one. Right now, the focus in the editing window is HERE, <text:span text:style-name="T8">but although “H Headings†is selected in the upper left corner of Navigator, the highlight jumps down to section 2! (Btw: when I tried to paste the screenshot below this text, it went to a completely different page, which is yet another bug in LO Writer, which is not subject of this bug report, but I keep note of it to report it in another bug report soon). In order to paste my picture where I want it to appear, I rearranged my text into a table and pasted the picture to a cell below. </text:span><text:span text:style-name="T10">Strangely, this picture goes to the next page in this section!</text:span><text:span text:style-name="T8">)</text:span></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <text:soft-page-break/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"><draw:frame draw:style-name="fr1" draw:name="Image7" text:anchor-type="paragraph" svg:width="4.78cm" svg:height="9.999cm" draw:z-index="6"><draw:image draw:mime-type="image/png"></draw:image><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+/878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+AABJRU5ErkJggg==</office:binary-data></draw:frame></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_4" text:outline-level="4"><text:bookmark-start text:name="__RefHeading___Toc74209_2824860697"/><text:span text:style-name="T11">3. </text:span>Expected Behavior<text:bookmark-end text:name="__RefHeading___Toc74209_2824860697"/></text:h>
+ <text:p text:style-name="P15"><text:span text:style-name="T12">1.</text:span> Since “H Headings†is highlighted, I would expect this one highlighted:</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:p text:style-name="P16"><draw:frame draw:style-name="fr1" draw:name="Image8" text:anchor-type="paragraph" svg:width="5.02cm" svg:height="9.999cm" draw:z-index="5"><draw:image draw:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+/878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+AABJRU5ErkJggg==</office:binary-data></draw:image></draw:frame>However, whatever I do, as soon as I continue editing, Table3 is highlighted again in the editor window.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:p text:style-name="P17"><text:span text:style-name="T12">2.</text:span> I would have expected the <text:span text:style-name="T11">column to continue on the last page (which again is another quirk which I’ll report in another bug report).</text:span></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:p text:style-name="P15"><text:span text:style-name="T12">3.</text:span> <text:span text:style-name="T9">When editing this part, LibreOffice Writer started flickering</text:span> (a phenomemon which I also observed earlier but for which I was missing reproducible examples – and of course, this bug is not subject of this report, but I note it in order to use this file for a demonstration.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="P13"/>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/layout/data/page-remove-fly-table.odt b/sw/qa/core/layout/data/page-remove-fly-table.odt
new file mode 100644
index 000000000000..6aaf230966ef
--- /dev/null
+++ b/sw/qa/core/layout/data/page-remove-fly-table.odt
Binary files differ
diff --git a/sw/qa/core/layout/data/para-border-in-cell-clip.docx b/sw/qa/core/layout/data/para-border-in-cell-clip.docx
new file mode 100644
index 000000000000..7c516853648c
--- /dev/null
+++ b/sw/qa/core/layout/data/para-border-in-cell-clip.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/rtl-table.docx b/sw/qa/core/layout/data/rtl-table.docx
new file mode 100644
index 000000000000..a329229699e8
--- /dev/null
+++ b/sw/qa/core/layout/data/rtl-table.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/sorted-objs-insert.docx b/sw/qa/core/layout/data/sorted-objs-insert.docx
new file mode 100644
index 000000000000..4041ab986891
--- /dev/null
+++ b/sw/qa/core/layout/data/sorted-objs-insert.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/split-table-border.odt b/sw/qa/core/layout/data/split-table-border.odt
new file mode 100644
index 000000000000..743d54bd38c5
--- /dev/null
+++ b/sw/qa/core/layout/data/split-table-border.odt
Binary files differ
diff --git a/sw/qa/core/layout/data/split-table-merged-border.odt b/sw/qa/core/layout/data/split-table-merged-border.odt
new file mode 100644
index 000000000000..122bfd473c7c
--- /dev/null
+++ b/sw/qa/core/layout/data/split-table-merged-border.odt
Binary files differ
diff --git a/sw/qa/core/layout/data/table-fly-overlap-spacing.docx b/sw/qa/core/layout/data/table-fly-overlap-spacing.docx
index 648c8b93df29..1791bbee6d86 100644
--- a/sw/qa/core/layout/data/table-fly-overlap-spacing.docx
+++ b/sw/qa/core/layout/data/table-fly-overlap-spacing.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/table-in-footnote.docx b/sw/qa/core/layout/data/table-in-footnote.docx
new file mode 100644
index 000000000000..10e20ffbf44c
--- /dev/null
+++ b/sw/qa/core/layout/data/table-in-footnote.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/table-missing-join.docx b/sw/qa/core/layout/data/table-missing-join.docx
new file mode 100644
index 000000000000..1fabb9e5b27c
--- /dev/null
+++ b/sw/qa/core/layout/data/table-missing-join.docx
Binary files differ
diff --git a/sw/qa/core/layout/data/table-print-area-left.docx b/sw/qa/core/layout/data/table-print-area-left.docx
new file mode 100644
index 000000000000..e326bed82f39
--- /dev/null
+++ b/sw/qa/core/layout/data/table-print-area-left.docx
Binary files differ
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..2fe41c9ad142
--- /dev/null
+++ b/sw/qa/core/layout/data/tdf122894-4.doc
Binary files differ
diff --git a/sw/qa/core/layout/data/tdf157096.docx b/sw/qa/core/layout/data/tdf157096.docx
new file mode 100644
index 000000000000..bca591e8ad83
--- /dev/null
+++ b/sw/qa/core/layout/data/tdf157096.docx
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..41ff78d34dad
--- /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/fly.cxx b/sw/qa/core/layout/fly.cxx
new file mode 100644
index 000000000000..47cfb40fa6e7
--- /dev/null
+++ b/sw/qa/core/layout/fly.cxx
@@ -0,0 +1,91 @@
+/* -*- 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 <IDocumentLayoutAccess.hxx>
+#include <anchoredobject.hxx>
+#include <flyfrms.hxx>
+#include <pagefrm.hxx>
+#include <rootfrm.hxx>
+#include <sortedobjs.hxx>
+#include <docsh.hxx>
+#include <wrtsh.hxx>
+
+namespace
+{
+/// Covers sw/source/core/layout/fly.cxx fixes, i.e. mostly SwFlyFrame.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/layout/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNegativeHeight)
+{
+ // Given a document with complex enough content that a split fly frame temporarily moves below
+ // the bottom of the body frame on a page:
+ // When laying out the document, SwEditShell::CalcLayout() never returned:
+ createSwDoc("floattable-negative-height.docx");
+
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->Reformat();
+
+ // Make sure that all the pages have the expected content:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ for (SwFrame* pFrame = pLayout->Lower(); pFrame; pFrame = pFrame->GetNext())
+ {
+ auto pPage = pFrame->DynCastPageFrame();
+ if (!pPage->GetPrev())
+ {
+ // First page: start of the split fly chain:
+ CPPUNIT_ASSERT(pPage->GetSortedObjs());
+ SwSortedObjs& rPageObjs = *pPage->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ auto pFly = rPageObjs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pFly);
+ CPPUNIT_ASSERT(!pFly->GetPrecede());
+ CPPUNIT_ASSERT(pFly->GetFollow());
+ }
+ else if (pPage->GetPrev() && pPage->GetNext() && pPage->GetNext()->GetNext())
+ {
+ // Middle pages: have a previous and a next fly:
+ CPPUNIT_ASSERT(pPage->GetSortedObjs());
+ SwSortedObjs& rPageObjs = *pPage->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ auto pFly = rPageObjs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pFly);
+ CPPUNIT_ASSERT(pFly->GetPrecede());
+ CPPUNIT_ASSERT(pFly->GetFollow());
+ }
+ else if (pPage->GetPrev() && pPage->GetNext() && !pPage->GetNext()->GetNext())
+ {
+ // Page last but one: end of the fly chain:
+ CPPUNIT_ASSERT(pPage->GetSortedObjs());
+ SwSortedObjs& rPageObjs = *pPage->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ auto pFly = rPageObjs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pFly);
+ CPPUNIT_ASSERT(pFly->GetPrecede());
+ CPPUNIT_ASSERT(!pFly->GetFollow());
+ }
+ else if (pPage->GetPrev() && !pPage->GetNext())
+ {
+ // Last page: no flys.
+ CPPUNIT_ASSERT(!pPage->GetSortedObjs());
+ }
+ }
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/flycnt.cxx b/sw/qa/core/layout/flycnt.cxx
new file mode 100644
index 000000000000..07202905fc5f
--- /dev/null
+++ b/sw/qa/core/layout/flycnt.cxx
@@ -0,0 +1,1274 @@
+/* -*- 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 <svx/svdview.hxx>
+#include <comphelper/propertyvalue.hxx>
+
+#include <IDocumentLayoutAccess.hxx>
+#include <anchoredobject.hxx>
+#include <flyfrms.hxx>
+#include <formatflysplit.hxx>
+#include <pagefrm.hxx>
+#include <rootfrm.hxx>
+#include <sortedobjs.hxx>
+#include <tabfrm.hxx>
+#include <txtfrm.hxx>
+#include <fmtfsize.hxx>
+#include <docsh.hxx>
+#include <wrtsh.hxx>
+#include <itabenum.hxx>
+#include <frmmgr.hxx>
+#include <frameformats.hxx>
+#include <cellfrm.hxx>
+#include <ndtxt.hxx>
+#include <dflyobj.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <formatwraptextatflystart.hxx>
+
+namespace
+{
+/// Covers sw/source/core/layout/flycnt.cxx fixes, i.e. mostly SwFlyAtContentFrame.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/layout/data/")
+ {
+ }
+
+ /// Creates a document with a multi-page floating table: 1 columns and 2 rows.
+ void Create1x2SplitFly();
+};
+
+void Test::Create1x2SplitFly()
+{
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwPageDesc aStandard(pDoc->GetPageDesc(0));
+ SwFormatFrameSize aPageSize(aStandard.GetMaster().GetFrameSize());
+ // 10 cm for the page height, 2cm are the top and bottom margins, so 6cm remains for the body
+ // frame:
+ aPageSize.SetHeight(5669);
+ aStandard.GetMaster().SetFormatAttr(aPageSize);
+ pDoc->ChgPageDesc(0, aStandard);
+ // Insert a table:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwInsertTableOptions aTableOptions(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(aTableOptions, /*nRows=*/2, /*nCols=*/1);
+ pWrtShell->MoveTable(GotoPrevTable, fnTableStart);
+ pWrtShell->GoPrevCell();
+ pWrtShell->Insert("A1");
+ SwFormatFrameSize aRowSize(SwFrameSize::Minimum);
+ // 4 cm, so 2 rows don't fit 1 page.
+ aRowSize.SetHeight(2267);
+ pWrtShell->SetRowHeight(aRowSize);
+ pWrtShell->GoNextCell();
+ pWrtShell->Insert("A2");
+ pWrtShell->SetRowHeight(aRowSize);
+ // Select cell:
+ pWrtShell->SelAll();
+ // Select table:
+ pWrtShell->SelAll();
+ // Wrap the table in a text frame:
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ pWrtShell->StartAllAction();
+ aMgr.InsertFlyFrame(RndStdIds::FLY_AT_PARA, aMgr.GetPos(), aMgr.GetSize());
+ pWrtShell->EndAllAction();
+ // Allow the text frame to split:
+ pWrtShell->StartAllAction();
+ auto& rFlys = *pDoc->GetSpzFrameFormats();
+ auto pFly = rFlys[0];
+ SwAttrSet aSet(pFly->GetAttrSet());
+ aSet.Put(SwFormatFlySplit(true));
+ pDoc->SetAttr(aSet, *pFly);
+ pWrtShell->EndAllAction();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ // We have 2 pages:
+ CPPUNIT_ASSERT(pPage1->GetNext());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyWithTable)
+{
+ // Given a document with a multi-page floating table:
+ createSwDoc("floattable.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the first row goes to page 1 and the second row goes to page 2, while the
+ // table is floating:
+ SwDoc* pDoc = getSwDoc();
+ // Without the accompanying fix in place, this test would have failed with a stack overflow
+ // because the follow frame of the anchor was moved into the follow frame of the fly, so the fly
+ // was anchored in itself.
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ // Page 1 has a master fly, which contains a master table:
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ CPPUNIT_ASSERT(!pPage1Fly->GetPrecede());
+ CPPUNIT_ASSERT(pPage1Fly->GetFollow());
+ auto pPage1Table = dynamic_cast<SwTabFrame*>(pPage1Fly->GetLower());
+ CPPUNIT_ASSERT(pPage1Table);
+ CPPUNIT_ASSERT(!pPage1Table->GetPrecede());
+ CPPUNIT_ASSERT(pPage1Table->GetFollow());
+ // Page 2 has a follow fly, which contains a follow table:
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ CPPUNIT_ASSERT(pPage2Fly->GetPrecede());
+ CPPUNIT_ASSERT(!pPage2Fly->GetFollow());
+ auto pPage2Table = dynamic_cast<SwTabFrame*>(pPage2Fly->GetLower());
+ CPPUNIT_ASSERT(pPage2Table);
+ CPPUNIT_ASSERT(pPage2Table->GetPrecede());
+ CPPUNIT_ASSERT(!pPage2Table->GetFollow());
+ // Page 1 anchor has no text:
+ auto pPage1Anchor = dynamic_cast<SwTextFrame*>(pPage1->FindLastBodyContent());
+ CPPUNIT_ASSERT(pPage1Anchor);
+ // This failed, page 1 anchor had unexpected, leftover text.
+ CPPUNIT_ASSERT(!pPage1Anchor->HasPara());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyVertOffset)
+{
+ // Given a document with a floattable, split on 2 pages and a positive vertical offset:
+ createSwDoc("floattable-vertoffset.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the vert offset has an effect on the master fly, but not on follow flys:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ auto pPage1Anchor = dynamic_cast<SwTextFrame*>(pPage1->FindLastBodyContent());
+ CPPUNIT_ASSERT(pPage1Anchor);
+ SwTwips nPage1AnchorTop = pPage1Anchor->getFrameArea().Top();
+ SwTwips nPage1FlyTop = pPage1Fly->getFrameArea().Top();
+ // First page, the vert offset should be there. This comes from word/document.xml:
+ // <w:tblpPr ... w:tblpY="1135"/>
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(1135), nPage1FlyTop - nPage1AnchorTop);
+
+ // Also verify that the 2nd page has no such offset:
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ auto pPage2Anchor = dynamic_cast<SwTextFrame*>(pPage2->FindLastBodyContent());
+ CPPUNIT_ASSERT(pPage2Anchor);
+ SwTwips nPage2AnchorTop = pPage2Anchor->getFrameArea().Top();
+ SwTwips nPage2FlyTop = pPage2Fly->getFrameArea().Top();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 1135
+ // i.e. the fly frame on the 2nd page was also shifted down in Writer, but not in Word.
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(0), nPage2FlyTop - nPage2AnchorTop);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFly3Pages)
+{
+ // Given a document with a floattable, split on 3 pages:
+ createSwDoc("floattable-3pages.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that row 1, 2 & 3 go to page 1, 2 & 3, while the table is floating:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ auto pPage1Anchor = dynamic_cast<SwTextFrame*>(pPage1->FindLastBodyContent());
+ CPPUNIT_ASSERT(pPage1Anchor);
+ SwTwips nPage1AnchorTop = pPage1Anchor->getFrameArea().Top();
+ SwTwips nPage1FlyTop = pPage1Fly->getFrameArea().Top();
+ // The vert offset should be there on the first page:
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(1135), nPage1FlyTop - nPage1AnchorTop);
+ // Second page:
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. both the 2nd and 3rd fly was anchored on page 2.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ auto pPage2Anchor = dynamic_cast<SwTextFrame*>(pPage2->FindLastBodyContent());
+ CPPUNIT_ASSERT(pPage2Anchor);
+ SwTwips nPage2AnchorTop = pPage2Anchor->getFrameArea().Top();
+ SwTwips nPage2FlyTop = pPage2Fly->getFrameArea().Top();
+ // No vert offset on the second page:
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(0), nPage2FlyTop - nPage2AnchorTop);
+ // 3rd page:
+ auto pPage3 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage3);
+ const SwSortedObjs& rPage3Objs = *pPage3->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage3Objs.size());
+ auto pPage3Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage3Objs[0]);
+ CPPUNIT_ASSERT(pPage3Fly);
+ auto pPage3Anchor = dynamic_cast<SwTextFrame*>(pPage3->FindLastBodyContent());
+ CPPUNIT_ASSERT(pPage3Anchor);
+ SwTwips nPage3AnchorTop = pPage3Anchor->getFrameArea().Top();
+ SwTwips nPage3FlyTop = pPage3Fly->getFrameArea().Top();
+ // No vert offset on the 3rd page:
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(0), nPage3FlyTop - nPage3AnchorTop);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyRow)
+{
+ // Given a document with a floattable, single row split on 2 pages:
+ createSwDoc("floattable-rowsplit.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the single row is split to 2 pages, and the fly frames have the correct
+ // coordinates:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ auto pPage1Anchor = dynamic_cast<SwTextFrame*>(pPage1->FindLastBodyContent());
+ CPPUNIT_ASSERT(pPage1Anchor);
+ // ~No offset between the fly and its anchor:
+ SwTwips nPage1AnchorTop = pPage1Anchor->getFrameArea().Top();
+ SwTwips nPage1FlyTop = pPage1Fly->getFrameArea().Top();
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(1), nPage1FlyTop - nPage1AnchorTop);
+ // Second page:
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ auto pPage2Anchor = dynamic_cast<SwTextFrame*>(pPage2->FindLastBodyContent());
+ CPPUNIT_ASSERT(pPage2Anchor);
+ // No offset between the fly and its anchor:
+ SwTwips nPage2AnchorTop = pPage2Anchor->getFrameArea().Top();
+ SwTwips nPage2FlyTop = pPage2Fly->getFrameArea().Top();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : -1440
+ // i.e. the 2nd page's fly had a wrong position.
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(0), nPage2FlyTop - nPage2AnchorTop);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyEnable)
+{
+ // Given a document with a table in a textframe:
+ Create1x2SplitFly();
+
+ // Then make sure that the layout is updated and we have 2 pages:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ // Without the accompanying fix in place, this test would have failed, there was no 2nd page.
+ CPPUNIT_ASSERT(pPage2);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyDisable)
+{
+ // Given a document with a floating table, table split on 2 pages:
+ Create1x2SplitFly();
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetNext());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ CPPUNIT_ASSERT(pPage1Fly->GetFollow());
+
+ // When turning the "split fly" checkbox off:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->StartAllAction();
+ auto& rFlys = *pDoc->GetSpzFrameFormats();
+ auto pFly = rFlys[0];
+ SwAttrSet aSet(pFly->GetAttrSet());
+ // Note how the UI puts a SwFormatFrameSize into this item set with a slightly different size
+ // (e.g. 3823 twips width -> 3821). This means that by accident the UI works even without the
+ // explicit RES_FLY_SPLIT handling in SwFlyFrame::UpdateAttr_(), but this test will fail when
+ // that is missing.
+ aSet.Put(SwFormatFlySplit(false));
+ pDoc->SetAttr(aSet, *pFly);
+ pWrtShell->EndAllAction();
+
+ // Then make sure the extra page and follow fly frame is joined:
+ CPPUNIT_ASSERT(!pPage1->GetNext());
+ // Without the accompanying fix in place, this test would have failed, the follow fly frame was
+ // moved to page 1, but it wasn't deleted.
+ CPPUNIT_ASSERT(!pPage1Fly->GetFollow());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyFooter)
+{
+ // Given a document with a floattable, table split on 2 pages with headers/footers:
+ createSwDoc("floattable-footer.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the table is split to 2 pages:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ SwTwips nPage1Top = pPage1->getFrameArea().Top();
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ SwTwips nPage1FlyTop = pPage1Fly->getFrameArea().Top();
+ // <w:tblpPr w:tblpY="3286"> from the bugdoc.
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(3286), nPage1FlyTop - nPage1Top);
+ // Second page:
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ // Without the accompanying fix in place, this test would have failed, there was no 2nd page.
+ CPPUNIT_ASSERT(pPage2);
+ SwTwips nPage2Top = pPage2->getFrameArea().Top();
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ SwTwips nPage2FlyTop = pPage2Fly->getFrameArea().Top();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1440
+ // - Actual : 0
+ // i.e. <w:pgMar w:top="1440"> from the bugdoc was lost, the follow fly had no vertical offset.
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(1440), nPage2FlyTop - nPage2Top);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyFooter2Rows)
+{
+ // Given a document with a 2nd page that contains the second half of a split row + a last row:
+ createSwDoc("floattable-footer-2rows.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the table is split to 2 pages:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ // Without the accompanying fix in place, this test would have failed. The 2nd page only had the
+ // 2nd half of the split row and the last row went to a 3rd page.
+ CPPUNIT_ASSERT(!pPage2->GetNext());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFly2Cols)
+{
+ // Given a document with a 2nd page that contains the second half of a split row and 2 columns:
+ createSwDoc("floattable-2cols.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the table is split to 2 pages:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ // Without the accompanying fix in place, this test would have failed. The 2nd page only had the
+ // 2nd half of the split row and the very last row went to a 3rd page.
+ CPPUNIT_ASSERT(!pPage2->GetNext());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyWidow)
+{
+ // Given a document with a 2nd page that contains 2 lines, due to widow control:
+ createSwDoc("floattable-widow.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that widow control works:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ SwFrame* pTab1 = pPage1Fly->GetLower();
+ SwFrame* pRow1 = pTab1->GetLower();
+ SwFrame* pCell1 = pRow1->GetLower();
+ auto pText1 = dynamic_cast<SwTextFrame*>(pCell1->GetLower());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 6
+ // - Actual : 7
+ // i.e. widow control was disabled, layout didn't match Word.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(6), pText1->GetThisLines());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ SwFrame* pTab2 = pPage2Fly->GetLower();
+ SwFrame* pRow2 = pTab2->GetLower();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1014
+ // - Actual : 553
+ // i.e. <w:trHeight w:val="1014"> from the file was ignored.
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(1014), pRow2->getFrameArea().Height());
+ SwFrame* pCell2 = pRow2->GetLower();
+ auto pText2 = dynamic_cast<SwTextFrame*>(pCell2->GetLower());
+ // And then similarly this was 1, not 2.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), pText2->GetThisLines());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyCompat14)
+{
+ // Given a Word 2010 document with 2 pages, one table row each:
+ createSwDoc("floattable-compat14.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the first row is entirely on page 1:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ SwFrame* pTab1 = pPage1Fly->GetLower();
+ SwFrame* pRow1 = pTab1->GetLower();
+ auto pCell1 = dynamic_cast<SwCellFrame*>(pRow1->GetLower());
+ // Without the accompanying fix in place, this test would have failed, the first row was split,
+ // but not in Word.
+ CPPUNIT_ASSERT(!pCell1->GetFollowCell());
+ // Also make sure that the second row is entirely on page 2:
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ SwFrame* pTab2 = pPage2Fly->GetLower();
+ SwFrame* pRow2 = pTab2->GetLower();
+ auto pCell2 = dynamic_cast<SwCellFrame*>(pRow2->GetLower());
+ // Without the accompanying fix in place, this test would have failed, the second row was split,
+ // but not in Word.
+ CPPUNIT_ASSERT(!pCell2->GetPreviousCell());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyCompat14Nosplit)
+{
+ // Given a Word 2010 document with 2 pages, 2 rows on page 1, 1 row on page 2:
+ createSwDoc("floattable-compat14-nosplit.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the last row is on a separate page:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ SwFrame* pTab1 = pPage1Fly->GetLower();
+ SwFrame* pRow1 = pTab1->GetLower();
+ CPPUNIT_ASSERT(pRow1->GetNext());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ // Without the accompanying fix in place, this test would have failed, all rows were on page 1.
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ SwFrame* pTab2 = pPage2Fly->GetLower();
+ SwFrame* pRow2 = pTab2->GetLower();
+ CPPUNIT_ASSERT(!pRow2->GetNext());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyCompat14Body)
+{
+ // Given a Word 2010 document with 2 pages, 1 row on page 1, 1 row on page 2:
+ createSwDoc("floattable-compat14-body.docx");
+
+ // When laying out that document:
+ // (This is legacy mode, but still Word doesn't split row 2 because 1) row 2 has a minimal
+ // height, so even the first part of row 2 would not fit the body frame and 2) Word allows using
+ // the bottom margin area in legacy mode, but only in case the fly height <= body height.)
+ calcLayout();
+
+ // Then make sure that the second row is on a page 2:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ SwFrame* pTab1 = pPage1Fly->GetLower();
+ SwFrame* pRow1 = pTab1->GetLower();
+ // Without the accompanying fix in place, this test would have failed, part of row 2 was on page
+ // 1.
+ CPPUNIT_ASSERT(!pRow1->GetNext());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ SwFrame* pTab2 = pPage2Fly->GetLower();
+ SwFrame* pRow2 = pTab2->GetLower();
+ CPPUNIT_ASSERT(!pRow2->GetNext());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyFollowHorizontalPosition)
+{
+ // Given a document with 2 pages, master fly on page 1, follow fly on page 2:
+ createSwDoc("floattable-hori-pos.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the follow fly doesn't have a different horizontal position:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ tools::Long nPage1FlyLeft = pPage1Fly->getFrameArea().Left();
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ CPPUNIT_ASSERT(pPage2Fly);
+ tools::Long nPage2FlyLeft = pPage2Fly->getFrameArea().Left();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 5528
+ // - Actual : 284
+ // i.e. the follow fly was pushed towards the left, instead of having the same position as the
+ // master fly.
+ CPPUNIT_ASSERT_EQUAL(nPage1FlyLeft, nPage2FlyLeft);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCursorTraversal)
+{
+ // Given a document with a multi-page floating table:
+ Create1x2SplitFly();
+
+ // When going from A1 to A2:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->GotoTable("Table1");
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), pTextNode->GetText());
+ pWrtShell->Down(/*bSelect=*/false);
+
+ // Then make sure we get to A2 and don't stay in A1:
+ pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: A2
+ // - Actual : A1
+ // i.e. the cursor didn't get from A1 to A2.
+ CPPUNIT_ASSERT_EQUAL(OUString("A2"), pTextNode->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyRowDelete)
+{
+ // Given a document with a multi-page floating table:
+ Create1x2SplitFly();
+
+ // When deleting the row of A2:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->GotoTable("Table1");
+ pWrtShell->Down(/*bSelect=*/false);
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ // We delete the right row:
+ CPPUNIT_ASSERT_EQUAL(OUString("A2"), pTextNode->GetText());
+ pWrtShell->DeleteRow();
+
+ // Then make sure we only have 1 page:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(!pPage1->GetNext());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFly1stRowDelete)
+{
+ // Given a document with a multi-page floating table:
+ Create1x2SplitFly();
+
+ // When deleting the row of A1:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->GotoTable("Table1");
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ // We delete the right row:
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), pTextNode->GetText());
+ pWrtShell->DeleteRow();
+
+ // Then make sure we only have 1 page:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ // Without the accompanying fix in place, this test would have failed, the follow fly was still
+ // on page 2.
+ CPPUNIT_ASSERT(!pPage1->GetNext());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFly3rdRowDelete)
+{
+ // Given a document with a floattable, split on 3 pages:
+ createSwDoc("floattable-3pages.docx");
+
+ // When deleting the row of A3:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->GotoTable("Table1");
+ pWrtShell->Down(/*bSelect=*/false);
+ pWrtShell->Down(/*bSelect=*/false);
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ // We delete the right row:
+ CPPUNIT_ASSERT_EQUAL(OUString("A3"), pTextNode->GetText());
+ pWrtShell->DeleteRow();
+
+ // Then make sure we only have 2 pages:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ // Without the accompanying fix in place, this test would have failed, page 3 was not deleted.
+ CPPUNIT_ASSERT(!pPage2->GetNext());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFly2ndRowSelect)
+{
+ // Given a document with a multi-page floating table:
+ createSwDoc("floattable.docx");
+
+ // When selecting the second row:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ auto pPage2Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage2Objs[0]);
+ const SwRect& aFollowArea = pPage2Fly->getFrameArea();
+ Point aTopCenter((aFollowArea.Left() + aFollowArea.Right()) / 2, aFollowArea.Top());
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->SelectObj(aTopCenter);
+
+ // Then make sure the first row is selected:
+ const SdrMarkList& rMarkList = pWrtShell->GetDrawView()->GetMarkedObjectList();
+ SdrObject* pSelectedObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ auto pSelectedVirtObj = dynamic_cast<SwVirtFlyDrawObj*>(pSelectedObj);
+ auto pSelected = static_cast<SwFlyAtContentFrame*>(pSelectedVirtObj->GetFlyFrame());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 5
+ // - Actual : 17
+ // i.e. a follow fly was possible to select (instead of its master)
+ CPPUNIT_ASSERT_EQUAL(pPage2Fly->GetPrecede()->GetFrameId(), pSelected->GetFrameId());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyInSection)
+{
+ // This crashed, the layout assumed that the floating table is directly under the body frame.
+ createSwDoc("floattable-in-section.docx");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyThenTable)
+{
+ // Given a document with a 2 page floating table, followed by an other table:
+ // Intentionally load the document as hidden to avoid layout during load (see TestTdf150616):
+ uno::Sequence<beans::PropertyValue> aFilterOptions = {
+ comphelper::makePropertyValue("Hidden", true),
+ };
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(u"/sw/qa/core/layout/data/")
+ + "floattable-then-table.docx",
+ "com.sun.star.text.TextDocument", aFilterOptions);
+
+ // When layout is calculated during PDF export:
+ // Then make sure that finishes without errors:
+ // This crashed, due to a stack overflow in layout code.
+ save("writer_pdf_Export");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyInTextSection)
+{
+ // The document contains a DOCX cont sect break, which is mapped to a TextSection.
+ // This crashed, the anchor was split directly, so the follow anchor was moved outside the
+ // section frame, which is broken.
+ createSwDoc("floattable-in-text-section.docx");
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyTableRowKeep)
+{
+ // Given a document with a floating table, 2.5 rows on the first page:
+ createSwDoc("floattable-table-row-keep.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the expected amount of rows is on the first page:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ SwFrame* pTab1 = pPage1Fly->GetLower();
+ SwFrame* pRow1 = pTab1->GetLower();
+ CPPUNIT_ASSERT(pRow1);
+ SwFrame* pRow2 = pRow1->GetNext();
+ // Without the accompanying fix in place, this test would have failed, the table on the first
+ // page only had 1 row, due to TableRowKeep kicking in for floating tables, which is incorrect.
+ CPPUNIT_ASSERT(pRow2);
+ SwFrame* pRow3 = pRow2->GetNext();
+ CPPUNIT_ASSERT(pRow3);
+ auto pCell3 = dynamic_cast<SwCellFrame*>(pRow3->GetLower());
+ CPPUNIT_ASSERT(pCell3->GetFollowCell());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyDeletedAnchor)
+{
+ // Given a document with a floating table that spans over 3 pages:
+ createSwDoc("floattable-deleted-anchor.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that there are 3 anchors for the 3 pages:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ SwFrame* pBody1 = pPage1->GetLower();
+ CPPUNIT_ASSERT(pBody1);
+ auto pAnchor1 = dynamic_cast<SwTextFrame*>(pBody1->GetLower()->GetNext());
+ CPPUNIT_ASSERT(pAnchor1);
+ SwTextFrame* pAnchor2 = pAnchor1->GetFollow();
+ CPPUNIT_ASSERT(pAnchor2);
+ SwTextFrame* pAnchor3 = pAnchor2->GetFollow();
+ // Without the accompanying fix in place, this test would have failed, the fly frame on the 3rd
+ // page was anchored to a text frame on the 2nd page, leading to a negative frame height.
+ CPPUNIT_ASSERT(pAnchor3);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyMultiCol)
+{
+ // Given a document with a floating table that is in a multi-col section:
+ createSwDoc("floattable-multi-col.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the fly frame is not split, matching Word:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ CPPUNIT_ASSERT(pPage1Fly);
+ // Without the accompanying fix in place, this test would have failed, we tried to split and
+ // then hit an assertion failure.
+ CPPUNIT_ASSERT(!pPage1Fly->GetFollow());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyTabJoin)
+{
+ // Given a document with 3 pages and 2 tables: table on first and second page, 3rd page has no
+ // table:
+ createSwDoc("floattable-tab-join.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that all pages have the expected amount of fly frames:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. the 2nd page had 2 fly frames, hosting a split table, instead of joining that table and
+ // having 1 fly frame.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage3 = dynamic_cast<SwPageFrame*>(pPage2->GetNext());
+ CPPUNIT_ASSERT(pPage3);
+ CPPUNIT_ASSERT(!pPage3->GetSortedObjs());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyTabJoinLegacy)
+{
+ // Given a document with 3 pages and 2 tables: table on first and second page, 3rd page has no
+ // table (Word 2010 mode):
+ createSwDoc("floattable-tab-join-legacy.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that all pages have the expected amount of fly frames:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. the 2nd page had 2 fly frames, hosting a split table, instead of joining that table and
+ // having 1 fly frame (even after the non-legacy case was fixed already).
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage3 = dynamic_cast<SwPageFrame*>(pPage2->GetNext());
+ CPPUNIT_ASSERT(pPage3);
+ CPPUNIT_ASSERT(!pPage3->GetSortedObjs());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyObjectFormatter)
+{
+ // Given a document with 3 pages and 2 tables: table on first and second page, 3rd page has no
+ // table:
+ createSwDoc("floattable-object-formatter.docx");
+
+ // When calculating the layout:
+ calcLayout();
+
+ // Then make sure we don't crash and also that all pages have the expected amount of fly frames:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage3 = dynamic_cast<SwPageFrame*>(pPage2->GetNext());
+ CPPUNIT_ASSERT(pPage3);
+ CPPUNIT_ASSERT(!pPage3->GetSortedObjs());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNextLeafInSection)
+{
+ // Given a document with 4 pages: page 1 had a floating table, page 2 & 3 had a second floating
+ // table and finally page 4 is empty:
+ createSwDoc("floattable-next-leaf-in-section.docx");
+
+ // When calculating the layout:
+ // Then this never returned, the loop in SwFrame::GetNextFlyLeaf() never finished.
+ calcLayout();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyAnchorKeepWithNext)
+{
+ // Given a document with 2 pages, a split floating table on both pages:
+ createSwDoc("floattable-anchor-keep-with-next.docx");
+
+ // When calculating the layout:
+ calcLayout();
+
+ // Then make sure the pages have the expected amount of anchored objects:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ // Without the accompanying fix in place, this test would have failed, page 1 had no floating
+ // table, it was entirely on page 2.
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNoFooterOverlap)
+{
+ // Given a document with 2 pages, a floating table on both pages:
+ createSwDoc("floattable-no-footer-overlap.doc");
+
+ // When calculating the layout:
+ calcLayout();
+
+ // Then make sure the second page has a floating table:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. part of the second table was on page 1.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ // Without the accompanying fix in place, this test would have failed, there was no page 2, both
+ // floating tables were on page 1.
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyGrowFromBottom)
+{
+ // Given a document with a floating table that grows from the bottom:
+ createSwDoc("floattable-from-bottom.docx");
+
+ // When calculating the layout:
+ calcLayout();
+
+ // Then make sure that such a floating table is not split, matching Word:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ const auto pFly = dynamic_cast<SwFlyAtContentFrame*>(rPage1Objs[0]);
+ // Without the accompanying fix in place, this test would have failed, we tried to split the fly
+ // frame on page 1 even when it would fit, and this lead to a crash on export later.
+ CPPUNIT_ASSERT(!pFly->GetFollow());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyIntoTable)
+{
+ // Given a document with a floating table, then an inline table on the next page:
+ createSwDoc("floattable-then-table.doc");
+
+ // When inserting a page break:
+ // Then make sure the layout doesn't crash:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->InsertPageBreak();
+ // Without the accompanying fix in place, this test would have crashed, we tried to insert the
+ // second part of a floating table into a table on the next page, not before that table.
+ calcLayout();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyFromAsCharAnchor)
+{
+ // Given a document with a footnote that has a table (imported in an as-char anchored frame in
+ // Writer):
+ createSwDoc("table-in-footnote.docx");
+
+ // When changing the anchor type of that frame to to-para:
+ // Then make sure we don't crash:
+ selectShape(1);
+ // Without the accompanying fix in place, this test would have crashed, we tried to split a
+ // frame+table inside a footnote.
+ dispatchCommand(mxComponent, ".uno:SetAnchorToPara", {});
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNested)
+{
+ // Given a document with a nested, multi-page floating table:
+ // When calculating the layout:
+ createSwDoc("floattable-nested.odt");
+ calcLayout();
+
+ // Then make sure we don't crash:
+ // Without the accompanying fix in place, this test would have crashed.
+ // Check that we have exactly 4 fly frames, all of them on the expected pages: master outer,
+ // follow outer, master inner and follow inner.
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rPage1Objs.size());
+ auto pPage1Fly1 = rPage1Objs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pPage1Fly1);
+ CPPUNIT_ASSERT(pPage1Fly1->GetAnchorFrameContainingAnchPos()->IsInFly());
+ CPPUNIT_ASSERT(pPage1Fly1->GetFollow());
+ auto pPage1Fly2 = rPage1Objs[1]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pPage1Fly2);
+ CPPUNIT_ASSERT(!pPage1Fly2->GetAnchorFrameContainingAnchPos()->IsInFly());
+ CPPUNIT_ASSERT(pPage1Fly2->GetFollow());
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rPage2Objs.size());
+ auto pPage2Fly1 = rPage2Objs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pPage2Fly1);
+ CPPUNIT_ASSERT(pPage2Fly1->GetAnchorFrameContainingAnchPos()->IsInFly());
+ CPPUNIT_ASSERT(pPage2Fly1->GetPrecede());
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 6204
+ // - Actual : 1725
+ // i.e. the inner follow fly had a bad position, it was outside the page rectangle, it was not
+ // rendered and this way the inner anchor had no fly portion, either.
+ CPPUNIT_ASSERT_GREATER(pPage2->getFrameArea().Top(), pPage2Fly1->getFrameArea().Top());
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected less than: 12523
+ // - Actual : 15312
+ // i.e. the inner follow fly was not "moved back" to its place to have the wanted 4400 position,
+ // which makes the "Inner A2" text visible.
+ CPPUNIT_ASSERT_LESS(pPage2->getFrameArea().Right(), pPage2Fly1->getFrameArea().Right());
+
+ auto pPage2Fly2 = rPage2Objs[1]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pPage2Fly2);
+ CPPUNIT_ASSERT(!pPage2Fly2->GetAnchorFrameContainingAnchPos()->IsInFly());
+ CPPUNIT_ASSERT(pPage2Fly2->GetPrecede());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNestedOverlap)
+{
+ // Given a document with a nested, multi-page floating table, enabling the "don't overlap" logic:
+ // When calculating the layout:
+ createSwDoc("floattable-nested-overlap.odt");
+ calcLayout();
+
+ // Then make sure we get 2 pages (2 flys on each page):
+ // Without the accompanying fix in place, this test would have failed with a layout loop.
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rPage1Objs.size());
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rPage2Objs.size());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyMoveMaster)
+{
+ // Given a document with a multi-page floating table on pages 1 -> 2 -> 3:
+ createSwDoc("floattable-move-master.docx");
+
+ // When adding an empty para at the start of the anchor text of the table:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->Down(/*bSelect=*/false, /*nCount=*/4);
+ pWrtShell->SplitNode();
+
+ // Then make sure page the fly chain is pages 1 -> 2 -> 3, still:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ // Without the accompanying fix in place, this test would have failed, the fly chain was pages 1
+ // -> 4 -> 2.
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage1Fly = rPage1Objs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pPage1Fly);
+ CPPUNIT_ASSERT(!pPage1Fly->GetPrecede());
+ CPPUNIT_ASSERT(pPage1Fly->HasFollow());
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage2Fly = rPage2Objs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pPage2Fly);
+ CPPUNIT_ASSERT(pPage2Fly->GetPrecede());
+ CPPUNIT_ASSERT(pPage2Fly->HasFollow());
+ auto pPage3 = pPage2->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage3);
+ CPPUNIT_ASSERT(pPage3->GetSortedObjs());
+ SwSortedObjs& rPage3Objs = *pPage3->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage3Objs.size());
+ auto pPage3Fly = rPage3Objs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pPage3Fly);
+ CPPUNIT_ASSERT(pPage3Fly->GetPrecede());
+ CPPUNIT_ASSERT(!pPage3Fly->GetFollow());
+ auto pPage4 = pPage3->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage4);
+ CPPUNIT_ASSERT(!pPage4->GetSortedObjs());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyDelEmpty)
+{
+ // Given a document with multiple floating tables and 7 pages:
+ // When loading that document:
+ // Without the accompanying fix in place, this test would have crashed due to a
+ // heap-use-after-free problem (visible with e.g. MALLOC_PERTURB_=153).
+ createSwDoc("floattable-del-empty.docx");
+
+ // Then make sure that the page count matches Word:
+ CPPUNIT_ASSERT_EQUAL(7, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyInTableInSection)
+{
+ // Given a document where page 2 and page 3 has a floating table inside an inline table, inside
+ // a section:
+ // Without the accompanying fix in place, this test would have crashed, we created a follow
+ // anchor which was marked as "in table", but had no table parent.
+ createSwDoc("floattable-in-inltbl-in-sect.docx");
+
+ // Then make sure that the floating table is on page 2 and page 3:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(!pPage1->GetSortedObjs());
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+ auto pPage3 = pPage2->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage3);
+ CPPUNIT_ASSERT(pPage3->GetSortedObjs());
+ SwSortedObjs& rPage3Objs = *pPage3->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage3Objs.size());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyWrapOnAllPages)
+{
+ // Given a document where we want to wrap on all pages, around a split floating table:
+ createSwDoc("floattable-wrap-on-all-pages.docx");
+ SwDoc* pDoc = getSwDoc();
+ pDoc->getIDocumentSettingAccess().set(DocumentSettingId::ALLOW_TEXT_AFTER_FLOATING_TABLE_BREAK,
+ true);
+
+ // When formatting that document:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->Reformat();
+
+ // Then make sure that the anchor text is also split between page 1 and page 2:
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ auto pPage1Anchor = pPage1->FindLastBodyContent()->DynCastTextFrame();
+ CPPUNIT_ASSERT(pPage1Anchor);
+ OUString aAnchor1Text(pPage1Anchor->GetText().subView(
+ static_cast<sal_Int32>(pPage1Anchor->GetOffset()),
+ static_cast<sal_Int32>(pPage1Anchor->GetFollow()->GetOffset()
+ - pPage1Anchor->GetOffset())));
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: He heard quiet steps behind him. That
+ // - Actual :
+ // i.e. the first page had no anchor text, only the second.
+ CPPUNIT_ASSERT_EQUAL(OUString("He heard quiet steps behind him. That "), aAnchor1Text);
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ auto pPage2Anchor = pPage2->FindLastBodyContent()->DynCastTextFrame();
+ CPPUNIT_ASSERT(pPage2Anchor);
+ OUString aAnchor2Text(
+ pPage2Anchor->GetText().subView(static_cast<sal_Int32>(pPage2Anchor->GetOffset())));
+ CPPUNIT_ASSERT(!pPage2Anchor->GetFollow());
+ CPPUNIT_ASSERT_EQUAL(OUString("didn't bode well."), aAnchor2Text);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyPerFrameWrapOnAllPages)
+{
+ // Given a document where we want to wrap on all pages, around a split floating table:
+ createSwDoc("floattable-wrap-on-all-pages.docx");
+ SwDoc* pDoc = getSwDoc();
+ sw::SpzFrameFormats& rFlys = *pDoc->GetSpzFrameFormats();
+ sw::SpzFrameFormat* pFly = rFlys[0];
+ SfxItemSet aSet(pFly->GetAttrSet());
+ SwFormatWrapTextAtFlyStart aItem(true);
+ aSet.Put(aItem);
+ pDoc->SetFlyFrameAttr(*pFly, aSet);
+
+ // When formatting that document:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->Reformat();
+
+ // Then make sure that the anchor text is also split between page 1 and page 2:
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ auto pPage1Anchor = pPage1->FindLastBodyContent()->DynCastTextFrame();
+ CPPUNIT_ASSERT(pPage1Anchor);
+ OUString aAnchor1Text(pPage1Anchor->GetText().subView(
+ static_cast<sal_Int32>(pPage1Anchor->GetOffset()),
+ static_cast<sal_Int32>(pPage1Anchor->GetFollow()->GetOffset()
+ - pPage1Anchor->GetOffset())));
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: He heard quiet steps behind him. That
+ // - Actual :
+ // i.e. the first page had no anchor text, only the second.
+ CPPUNIT_ASSERT_EQUAL(OUString("He heard quiet steps behind him. That "), aAnchor1Text);
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ auto pPage2Anchor = pPage2->FindLastBodyContent()->DynCastTextFrame();
+ CPPUNIT_ASSERT(pPage2Anchor);
+ OUString aAnchor2Text(
+ pPage2Anchor->GetText().subView(static_cast<sal_Int32>(pPage2Anchor->GetOffset())));
+ CPPUNIT_ASSERT(!pPage2Anchor->GetFollow());
+ CPPUNIT_ASSERT_EQUAL(OUString("didn't bode well."), aAnchor2Text);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/frmtool.cxx b/sw/qa/core/layout/frmtool.cxx
new file mode 100644
index 000000000000..2ee4c3a07d8c
--- /dev/null
+++ b/sw/qa/core/layout/frmtool.cxx
@@ -0,0 +1,40 @@
+/* -*- 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 <IDocumentLayoutAccess.hxx>
+#include <pagefrm.hxx>
+#include <rootfrm.hxx>
+
+namespace
+{
+/// Covers sw/source/core/layout/frmtool.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/layout/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableNoMargins)
+{
+ createSwDoc("floattable-nomargins.docx");
+
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(!pPage1->GetNext());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/ftnfrm.cxx b/sw/qa/core/layout/ftnfrm.cxx
new file mode 100644
index 000000000000..05c7f868b620
--- /dev/null
+++ b/sw/qa/core/layout/ftnfrm.cxx
@@ -0,0 +1,66 @@
+/* -*- 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 <IDocumentLayoutAccess.hxx>
+#include <docsh.hxx>
+#include <formatflysplit.hxx>
+#include <frmmgr.hxx>
+#include <pagefrm.hxx>
+#include <rootfrm.hxx>
+#include <view.hxx>
+#include <wrtsh.hxx>
+
+/// Covers sw/source/core/layout/ftnfrm.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/layout/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testFlySplitFootnoteLayout)
+{
+ // Given a document with a split fly (to host a table):
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ RndStdIds eAnchor = RndStdIds::FLY_AT_PARA;
+ pWrtShell->StartAllAction();
+ aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize());
+ pWrtShell->EndAllAction();
+ pWrtShell->StartAllAction();
+ sw::FrameFormats<sw::SpzFrameFormat*>& rFlys = *pDoc->GetSpzFrameFormats();
+ sw::SpzFrameFormat* pFly = rFlys[0];
+ SwAttrSet aSet(pFly->GetAttrSet());
+ aSet.Put(SwFormatFlySplit(true));
+ pDoc->SetAttr(aSet, *pFly);
+ pWrtShell->EndAllAction();
+ pWrtShell->UnSelectFrame();
+ pWrtShell->LeaveSelFrameMode();
+ pWrtShell->GetView().TriggerAttrChangedNotify();
+ pWrtShell->MoveSection(GoCurrSection, fnSectionEnd);
+
+ // When inserting a footnote:
+ pWrtShell->InsertFootnote(OUString());
+
+ // Then make sure the footnote frame and its container is created:
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage);
+ // Without the accompanying fix in place, this test would have failed, the footnote frame was
+ // not created, the footnote reference was empty.
+ CPPUNIT_ASSERT(pPage->FindFootnoteCont());
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/layact.cxx b/sw/qa/core/layout/layact.cxx
new file mode 100644
index 000000000000..9de0c9ebfa43
--- /dev/null
+++ b/sw/qa/core/layout/layact.cxx
@@ -0,0 +1,135 @@
+/* -*- 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 <vcl/scheduler.hxx>
+
+#include <IDocumentLayoutAccess.hxx>
+#include <anchoredobject.hxx>
+#include <docsh.hxx>
+#include <flyfrm.hxx>
+#include <pagefrm.hxx>
+#include <rootfrm.hxx>
+#include <rowfrm.hxx>
+#include <sortedobjs.hxx>
+#include <tabfrm.hxx>
+#include <wrtsh.hxx>
+#include <sectfrm.hxx>
+
+namespace
+{
+/// Covers sw/source/core/layout/layact.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/layout/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNextRowInvalidatePos)
+{
+ // Given a multi-page floating table, row1 is split, i.e. is both on page 1 and page 2:
+ createSwDoc("floattable-next-row-invalidate-pos.docx");
+ // Make sure the follow anchor's IsCompletePaint() reaches its false state, as it happens in the
+ // interactive case.
+ Scheduler::ProcessEventsToIdle();
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ auto pFly2 = rPage2Objs[0]->DynCastFlyFrame();
+ auto pTable2 = pFly2->GetLower()->DynCastTabFrame();
+ auto pRow2 = pTable2->GetLastLower()->DynCastRowFrame();
+ SwTwips nOldRow2Top = pRow2->getFrameArea().Top();
+
+ // When adding a new paragraph at the end of B1:
+ // Go to the table: A1 cell.
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->GotoTable("Table1");
+ // Go to the column: B1 cell.
+ pWrtShell->GoNextCell();
+ // Go to the end of the B1 cell, on page 2.
+ pWrtShell->EndOfSection();
+ // Add a new paragraph at the cell end.
+ pWrtShell->SplitNode();
+
+ // Then make sure row 2 is shifted down:
+ SwTwips nNewRow2Top = pRow2->getFrameArea().Top();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 7121
+ // - Actual : 7121
+ // i.e. row 2 has to be shifted down to 7390, but this didn't happen.
+ CPPUNIT_ASSERT_GREATER(nOldRow2Top, nNewRow2Top);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf157096)
+{
+ createSwDoc("tdf157096.docx");
+
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ // Without the fix in place, it would have crashed here
+ dispatchCommand(mxComponent, ".uno:Delete", {});
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyInSection)
+{
+ // Given a document with multiple sections, the 2nd section on page 1 has a one-page floating
+ // table:
+ createSwDoc("floattable-in-section.docx");
+
+ // When laying out that document:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+
+ // Then make sure the table is on page 1, not on page 2:
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ // Without the fix in place, it would have failed, the table was on page 2, not on page 1.
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(!pPage2->GetSortedObjs());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testBadSplitSection)
+{
+ // Given a document with a section, containing 5 paragraphs:
+ createSwDoc("bad-split-section.odt");
+
+ // When laying out that document:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+
+ // Then make sure the entire section is on page 1:
+ auto pPage = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage);
+ auto pBody = pPage->FindBodyCont();
+ CPPUNIT_ASSERT(pBody);
+ auto pSection = dynamic_cast<SwSectionFrame*>(pBody->GetLastLower());
+ CPPUNIT_ASSERT(pSection);
+ // Without the fix in place, it would have failed, the section was split between page 1 and page
+ // 2.
+ CPPUNIT_ASSERT(!pSection->GetFollow());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 6fe44dae97b6..5971e870304d 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -9,8 +9,14 @@
#include <swmodeltestbase.hxx>
+#include <com/sun/star/style/PageStyleLayout.hpp>
+
#include <vcl/gdimtf.hxx>
#include <svx/svdpage.hxx>
+#include <o3tl/string_view.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/dispatch.hxx>
+#include <editeng/frmdiritem.hxx>
#include <wrtsh.hxx>
#include <docsh.hxx>
@@ -20,24 +26,41 @@
#include <IDocumentState.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <rootfrm.hxx>
-
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/layout/data/";
+#include <itabenum.hxx>
+#include <fmtanchr.hxx>
+#include <fmtsrnd.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <fmtfsize.hxx>
+#include <fmtfollowtextflow.hxx>
+#include <view.hxx>
+#include <cmdid.h>
+#include <node.hxx>
+#include <ndtxt.hxx>
+#include <tabfrm.hxx>
+#include <cntfrm.hxx>
/// Covers sw/source/core/layout/ fixes.
class SwCoreLayoutTest : public SwModelTestBase
{
+public:
+ SwCoreLayoutTest()
+ : SwModelTestBase("/sw/qa/core/layout/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTableFlyOverlap)
{
// Load a document that has an image anchored in the header.
// It also has a table which has the wrap around the image.
- load(DATA_DIRECTORY, "table-fly-overlap.docx");
- SwTwips nFlyTop = parseDump("//header/txt/anchored/fly/infos/bounds", "top").toInt32();
- SwTwips nFlyHeight = parseDump("//header/txt/anchored/fly/infos/bounds", "height").toInt32();
+ createSwDoc("table-fly-overlap.docx");
+ SwTwips nFlyTop
+ = parseDump("//header/txt/anchored/fly/infos/bounds"_ostr, "top"_ostr).toInt32();
+ SwTwips nFlyHeight
+ = parseDump("//header/txt/anchored/fly/infos/bounds"_ostr, "height"_ostr).toInt32();
SwTwips nFlyBottom = nFlyTop + nFlyHeight;
- SwTwips nTableFrameTop = parseDump("//tab/infos/bounds", "top").toInt32();
- SwTwips nTablePrintTop = parseDump("//tab/infos/prtBounds", "top").toInt32();
+ SwTwips nTableFrameTop = parseDump("//tab/infos/bounds"_ostr, "top"_ostr).toInt32();
+ SwTwips nTablePrintTop = parseDump("//tab/infos/prtBounds"_ostr, "top"_ostr).toInt32();
SwTwips nTableTop = nTableFrameTop + nTablePrintTop;
// Without the accompanying fix in place, this test would have failed with:
// - Expected greater or equal than: 3579
@@ -51,18 +74,24 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTdf128195)
{
// Load a document that has two paragraphs in the header.
// The second paragraph should have its bottom spacing applied.
- load(DATA_DIRECTORY, "tdf128195.docx");
- sal_Int32 nTxtHeight = parseDump("//header/txt[2]/infos/bounds", "height").toInt32();
- sal_Int32 nTxtBottom = parseDump("//header/txt[2]/infos/bounds", "bottom").toInt32();
+ createSwDoc("tdf128195.docx");
+ sal_Int32 nTxtHeight = parseDump("//header/txt[2]/infos/bounds"_ostr, "height"_ostr).toInt32();
+ sal_Int32 nTxtBottom = parseDump("//header/txt[2]/infos/bounds"_ostr, "bottom"_ostr).toInt32();
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2269), nTxtHeight);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3529), nTxtBottom);
}
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testBIRT)
+{
+ // this looped
+ createSwDoc("birt_min.odt");
+}
+
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testBorderCollapseCompat)
{
// Load a document with a border conflict: top cell has a dotted bottom border, bottom cell has
// a solid upper border.
- load(DATA_DIRECTORY, "border-collapse-compat.docx");
+ createSwDoc("border-collapse-compat.docx");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pShell = pTextDoc->GetDocShell();
std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
@@ -75,14 +104,14 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testBorderCollapseCompat)
// - Actual : 48
// i.e. there was no single cell border with width=20, rather there were 48 border parts
// (forming a dotted border), all with width=40.
- assertXPath(pXmlDoc, "//polyline[@style='solid']", "width", "20");
+ assertXPath(pXmlDoc, "//polyline[@style='solid']"_ostr, "width"_ostr, "20");
}
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testBtlrTableRowSpan)
{
// Load a document which has a table. The A1 cell has btlr text direction, and the A1..A3 cells
// are merged.
- load(DATA_DIRECTORY, "btlr-table-row-span.odt");
+ createSwDoc("btlr-table-row-span.odt");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pShell = pTextDoc->GetDocShell();
std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
@@ -93,18 +122,19 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testBtlrTableRowSpan)
// - Expected: USA
// - Actual : West
// i.e. the "USA" text completely disappeared.
- assertXPathContent(pXmlDoc, "//textarray[1]/text", "USA");
+ assertXPathContent(pXmlDoc, "//textarray[1]/text"_ostr, "USA");
}
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTableFlyOverlapSpacing)
{
// Load a document that has an image on the right of a table. The table wraps around the image.
- load(DATA_DIRECTORY, "table-fly-overlap-spacing.docx");
- SwTwips nFlyTop = parseDump("//body/txt/anchored/fly/infos/bounds", "top").toInt32();
- SwTwips nFlyHeight = parseDump("//body/txt/anchored/fly/infos/bounds", "height").toInt32();
+ createSwDoc("table-fly-overlap-spacing.docx");
+ SwTwips nFlyTop = parseDump("//body/txt/anchored/fly/infos/bounds"_ostr, "top"_ostr).toInt32();
+ SwTwips nFlyHeight
+ = parseDump("//body/txt/anchored/fly/infos/bounds"_ostr, "height"_ostr).toInt32();
SwTwips nFlyBottom = nFlyTop + nFlyHeight;
- SwTwips nTableFrameTop = parseDump("//tab/infos/bounds", "top").toInt32();
- SwTwips nTablePrintTop = parseDump("//tab/infos/prtBounds", "top").toInt32();
+ SwTwips nTableFrameTop = parseDump("//tab/infos/bounds"_ostr, "top"_ostr).toInt32();
+ SwTwips nTablePrintTop = parseDump("//tab/infos/prtBounds"_ostr, "top"_ostr).toInt32();
SwTwips nTableTop = nTableFrameTop + nTablePrintTop;
// Without the accompanying fix in place, this test would have failed with:
// - Expected greater or equal than: 3993
@@ -116,7 +146,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTableFlyOverlapSpacing)
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTablesMoveBackwards)
{
// Load a document with 1 pages: empty content on first page, then 21 tables on the second page.
- load(DATA_DIRECTORY, "tables-move-backwards.odt");
+ createSwDoc("tables-move-backwards.odt");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pDocShell = pTextDoc->GetDocShell();
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
@@ -134,60 +164,60 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTablesMoveBackwards)
// - Actual : 2
// i.e. there was an unexpected 2nd page, as only 20 out of 21 tables were moved to the first
// page.
- assertXPath(pLayout, "//page", 1);
+ assertXPath(pLayout, "//page"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testContinuousEndnotesMoveBackwards)
{
// Load a document with the ContinuousEndnotes flag turned on.
- load(DATA_DIRECTORY, "continuous-endnotes-move-backwards.doc");
+ createSwDoc("continuous-endnotes-move-backwards.doc");
xmlDocUniquePtr pLayout = parseLayoutDump();
// We have 2 pages.
- assertXPath(pLayout, "/root/page", 2);
+ assertXPath(pLayout, "/root/page"_ostr, 2);
// No endnote container on page 1.
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 0
// - Actual : 1
// i.e. there were unexpected endnotes on page 1.
- assertXPath(pLayout, "/root/page[1]/ftncont", 0);
+ assertXPath(pLayout, "/root/page[1]/ftncont"_ostr, 0);
// All endnotes are in a container on page 2.
- assertXPath(pLayout, "/root/page[2]/ftncont", 1);
+ assertXPath(pLayout, "/root/page[2]/ftncont"_ostr, 1);
}
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testAnchorPositionBasedOnParagraph)
{
// tdf#134783 check whether position of shape is good if it is anchored to paragraph and
// the "Don't add space between paragraphs of the same style" option is set
- load(DATA_DIRECTORY, "tdf134783_testAnchorPositionBasedOnParagraph.fodt");
+ createSwDoc("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"_ostr, "top"_ostr, "1671");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[1]/bounds"_ostr, "bottom"_ostr, "1732");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[2]/bounds"_ostr, "top"_ostr, "1947");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[2]/bounds"_ostr, "bottom"_ostr, "2008");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[3]/bounds"_ostr, "top"_ostr, "3783");
+ assertXPath(pXmlDoc, "(//anchored/SwAnchoredDrawObject)[3]/bounds"_ostr, "bottom"_ostr, "3844");
}
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxStaysInsideShape)
{
// tdf#135198: check whether text box stays inside shape after moving it upwards
- load(DATA_DIRECTORY, "shape-textbox.odt");
+ createSwDoc("shape-textbox.odt");
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
CPPUNIT_ASSERT(pXmlDoc);
// 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"_ostr, "top"_ostr, "1932");
+ assertXPath(pXmlDoc, "//anchored/fly/infos/bounds"_ostr, "bottom"_ostr, "7184");
}
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxNotModifiedOnOpen)
{
// tdf#138050: a freshly opened document containing a shape with a text box
// should not appear to be modified
- load(DATA_DIRECTORY, "textbox-phantom-change.docx");
+ createSwDoc("textbox-phantom-change.docx");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
@@ -198,7 +228,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxNotModifiedOnOpen)
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxAutoGrowVertical)
{
- load(DATA_DIRECTORY, "textbox-autogrow-vertical.docx");
+ createSwDoc("textbox-autogrow-vertical.docx");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
@@ -208,20 +238,23 @@ 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"_ostr, "left"_ostr).toInt32();
+ sal_Int32 nFlyTop = getXPath(pLayout, "//anchored/fly/infos/bounds"_ostr, "top"_ostr).toInt32();
+ sal_Int32 nFlyRight
+ = getXPath(pLayout, "//anchored/fly/infos/bounds"_ostr, "right"_ostr).toInt32();
+ sal_Int32 nFlyBottom
+ = getXPath(pLayout, "//anchored/fly/infos/bounds"_ostr, "bottom"_ostr).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.
- CPPUNIT_ASSERT(aShapeRect.IsInside(aFlyRect));
+ CPPUNIT_ASSERT(aShapeRect.Contains(aFlyRect));
}
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextboxModification)
{
// Load a document with a textbox in it: the layout will have to position the shape part.
- load(DATA_DIRECTORY, "textbox-modification.docx");
+ createSwDoc("textbox-modification.docx");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pDocShell = pTextDoc->GetDocShell();
@@ -230,10 +263,26 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextboxModification)
CPPUNIT_ASSERT(!pDocShell->IsModified());
}
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextBoxInHeaderIsPositioned)
+{
+ // Load a document with a floating text box in the header
+ createSwDoc("header-textbox.docx");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 8051
+ // - Actual : 1418
+ // Comparison with 7000 chosen due to variability between devices
+ CPPUNIT_ASSERT_GREATEREQUAL(
+ double(7000),
+ getXPath(pXmlDoc, "//anchored/fly/infos/bounds"_ostr, "left"_ostr).toDouble());
+}
+
CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testBtlrNestedCell)
{
// Load a document with a nested table, the inner A1 cell has a btlr text direction.
- load(DATA_DIRECTORY, "btlr-nested-cell.odt");
+ createSwDoc("btlr-nested-cell.odt");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
@@ -260,16 +309,742 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testKeepwithnextFullheight)
// conflicting requirements.
// Without the accompanying fix in place, this test would have failed with a layout loop in
// SwEditShell::CalcLayout().
- load(DATA_DIRECTORY, "keepwithnext-fullheight.fodt");
+ createSwDoc("keepwithnext-fullheight.fodt");
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
CPPUNIT_ASSERT(pXmlDoc);
// Make sure the document has 2 pages.
- assertXPath(pXmlDoc, "//page", 2);
+ assertXPath(pXmlDoc, "//page"_ostr, 2);
// Heading stays on page 1 to avoid a layout loop.
- assertXPathContent(pXmlDoc, "//page[1]/body/txt[2]", "Heading");
+ assertXPathContent(pXmlDoc, "//page[1]/body/txt[2]"_ostr, "Heading");
// Image stays on page 2.
- assertXPath(pXmlDoc, "//page[2]/body/txt/anchored/fly", 1);
+ assertXPath(pXmlDoc, "//page[2]/body/txt/anchored/fly"_ostr, 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).
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ 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::Any(nGutterMm100));
+
+ // Verify that the new left edge is larger.
+ tools::Long nNewLeft = pPage->getFramePrintArea().Left();
+ tools::Long nGutterTwips = o3tl::toTwips(nGutterMm100, o3tl::Length::mm100);
+ // 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).
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ 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::Any(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::Any(nGutterMm100));
+
+ // Verify that the new top edge is larger.
+ tools::Long nNewTop = pPage->getFramePrintArea().Top();
+ tools::Long nGutterTwips = o3tl::toTwips(nGutterMm100, o3tl::Length::mm100);
+ // 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)
+{
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ 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::Any(style::PageStyleLayout_MIRRORED));
+ sal_Int32 nGutterMm100 = 2000;
+ xStandard->setPropertyValue("GutterMargin", uno::Any(nGutterMm100));
+
+ tools::Long nNewLeft = pPage->getFramePrintArea().Left();
+ tools::Long nGutterTwips = o3tl::toTwips(nGutterMm100, o3tl::Length::mm100);
+ 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:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ 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::Any(true));
+ sal_Int32 nGutterMm100 = 2000;
+ xStandard->setPropertyValue("GutterMargin", uno::Any(nGutterMm100));
+
+ // Then make sure the new right edge of the print area is decreased:
+ tools::Long nNewRight = pPage->getFramePrintArea().Right();
+ tools::Long nGutterTwips = o3tl::toTwips(nGutterMm100, o3tl::Length::mm100);
+ // 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.
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ uno::Reference<beans::XPropertySet> xStandard(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ sal_Int32 nGutterMm100 = 2000;
+ xStandard->setPropertyValue("GutterMargin", uno::Any(nGutterMm100));
+
+ // When setting a left border.
+ table::BorderLine2 aBorder;
+ aBorder.LineWidth = 2;
+ aBorder.OuterLineWidth = 2;
+ xStandard->setPropertyValue("LeftBorder", uno::Any(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]"_ostr, "x"_ostr, "2565");
+#endif
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTdf45908_invoice)
+{
+ // without the fix, this was hanging (and slowly consuming memory) on fileopen.
+ createSwDoc("tdf45908_invoice.odt");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testVerticallyMergedCellBorder)
+{
+ // Given a document with a table: 2 columns, 5 rows. B2 -> B5 is merged:
+ createSwDoc("vmerge-cell-border.docx");
+ SwDoc* pDoc = getSwDoc();
+ 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"_ostr);
+ 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 = o3tl::toInt32(reinterpret_cast<char const*>(pValue));
+ 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"_ostr);
+ 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 = o3tl::toInt32(reinterpret_cast<char const*>(pValue));
+ aLayoutPositions.push_back(nValue);
+ }
+ xmlChar* pValue = xmlGetProp(pXmlNode, BAD_CAST("bottom"));
+ sal_Int32 nValue = o3tl::toInt32(reinterpret_cast<char const*>(pValue));
+ 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) <= 30)
+ {
+ 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)
+{
+ createSwDoc("tdf122894-4.doc");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testLinkedBullet)
+{
+ // Given a document with a graphic bullet, where the image is a linked one:
+ createSwDoc("linked-bullet.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+
+ // When rendering that document:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Then make sure the render result contains exactly one bitmap:
+ MetafileXmlDump aDumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(aDumper, *xMetaFile);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the bullet's bitmap was lost.
+ assertXPath(pXmlDoc, "//bmpexscale"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testInnerCellBorderIntersect)
+{
+ // Given a table with both outer and inner borders:
+ createSwDoc("inner-border.docx");
+ SwDoc* pDoc = getSwDoc();
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // When rendering table borders:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Then make sure that inner and outer borders don't overlap in Word compatibility mode,
+ // and inner borders are reduced to prevent an overlap:
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ // Collect start/end (vertical) positions of horizontal borders.
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//polyline[@style='solid']/point"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ std::vector<std::pair<sal_Int32, sal_Int32>> aBorderStartEnds;
+ for (int i = 0; i < xmlXPathNodeSetGetLength(pXmlNodes); i += 2)
+ {
+ xmlNodePtr pStart = pXmlNodes->nodeTab[i];
+ xmlNodePtr pEnd = pXmlNodes->nodeTab[i + 1];
+ xmlChar* pStartY = xmlGetProp(pStart, BAD_CAST("y"));
+ xmlChar* pEndY = xmlGetProp(pEnd, BAD_CAST("y"));
+ sal_Int32 nStartY = o3tl::toInt32(reinterpret_cast<char const*>(pStartY));
+ sal_Int32 nEndY = o3tl::toInt32(reinterpret_cast<char const*>(pEndY));
+ if (nStartY != nEndY)
+ {
+ // Vertical border.
+ continue;
+ }
+ xmlChar* pStartX = xmlGetProp(pStart, BAD_CAST("x"));
+ xmlChar* pEndX = xmlGetProp(pEnd, BAD_CAST("x"));
+ sal_Int32 nStartX = o3tl::toInt32(reinterpret_cast<char const*>(pStartX));
+ sal_Int32 nEndX = o3tl::toInt32(reinterpret_cast<char const*>(pEndX));
+ aBorderStartEnds.emplace_back(nStartX, nEndX);
+ }
+ xmlXPathFreeObject(pXmlObj);
+ // We have 3 lines: top, middle and bottom. The top and the bottom one is a full line, since
+ // it's an outer border. The middle one has increased start and decreased end to avoid an
+ // overlap.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aBorderStartEnds.size());
+ CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].first, aBorderStartEnds[2].first);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 1724
+ // - Actual : 1724
+ // i.e. the middle line's start was the same as the top line start, while what we want is a
+ // larger X position, so the start of the middle line doesn't overlap with the thick vertical
+ // outer border on the left of the table.
+ CPPUNIT_ASSERT_GREATER(aBorderStartEnds[0].first, aBorderStartEnds[1].first);
+ CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].second, aBorderStartEnds[2].second);
+ CPPUNIT_ASSERT_LESS(aBorderStartEnds[0].second, aBorderStartEnds[1].second);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testInnerCellBorderNocompatIntersect)
+{
+ // Given a table with both outer and inner borders:
+ createSwDoc();
+ SwDocShell* pShell = getSwDocShell();
+ SwDoc* pDoc = pShell->GetDoc();
+ // Set the default page style's writing direction to vertical:
+ SwPageDesc aStandard(pDoc->GetPageDesc(0));
+ SvxFrameDirectionItem aDirection(SvxFrameDirection::Vertical_RL_TB, RES_FRAMEDIR);
+ aStandard.GetMaster().SetFormatAttr(aDirection);
+ pDoc->ChgPageDesc(0, aStandard);
+ // Insert a 4x4 table:
+ SwWrtShell* pWrtShell = pShell->GetWrtShell();
+ SwInsertTableOptions aTableOptions(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(aTableOptions, 4, 4);
+
+ // When rendering table borders:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Then make sure that all horizontal lines have the same length:
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ // Collect start/end (vertical) positions of horizontal borders.
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//polyline[@style='solid']/point"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ std::vector<std::pair<sal_Int32, sal_Int32>> aBorderStartEnds;
+ for (int i = 0; i < xmlXPathNodeSetGetLength(pXmlNodes); i += 2)
+ {
+ xmlNodePtr pStart = pXmlNodes->nodeTab[i];
+ xmlNodePtr pEnd = pXmlNodes->nodeTab[i + 1];
+ xmlChar* pStartY = xmlGetProp(pStart, BAD_CAST("y"));
+ xmlChar* pEndY = xmlGetProp(pEnd, BAD_CAST("y"));
+ sal_Int32 nStartY = o3tl::toInt32(reinterpret_cast<char const*>(pStartY));
+ sal_Int32 nEndY = o3tl::toInt32(reinterpret_cast<char const*>(pEndY));
+ if (nStartY != nEndY)
+ {
+ // Vertical border.
+ continue;
+ }
+ xmlChar* pStartX = xmlGetProp(pStart, BAD_CAST("x"));
+ xmlChar* pEndX = xmlGetProp(pEnd, BAD_CAST("x"));
+ sal_Int32 nStartX = o3tl::toInt32(reinterpret_cast<char const*>(pStartX));
+ sal_Int32 nEndX = o3tl::toInt32(reinterpret_cast<char const*>(pEndX));
+ aBorderStartEnds.emplace_back(nStartX, nEndX);
+ }
+ xmlXPathFreeObject(pXmlObj);
+ // We have 5 lines: top of 4 cells + bottom.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(5), aBorderStartEnds.size());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 9719
+ // - Actual : 10064
+ // i.e. the 2nd line started later than the first one, which is incorrect.
+ CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].first, aBorderStartEnds[1].first);
+ CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].first, aBorderStartEnds[2].first);
+ CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].first, aBorderStartEnds[3].first);
+ CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].first, aBorderStartEnds[4].first);
+ CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].second, aBorderStartEnds[1].second);
+ CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].second, aBorderStartEnds[2].second);
+ CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].second, aBorderStartEnds[3].second);
+ CPPUNIT_ASSERT_EQUAL(aBorderStartEnds[0].second, aBorderStartEnds[4].second);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testDoubleBorderVertical)
+{
+ // Given a table with a left and right double border, outer is thick, inner is thin:
+ createSwDoc("double-border-vertical.docx");
+ SwDoc* pDoc = getSwDoc();
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // When rendering that document:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Then make sure the left border is thick+thin and the right border is thin+thick (from left to
+ // right):
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ // Collect widths of vertical lines.
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//polyline[@style='solid']/point"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ // Horizontal position -> width.
+ std::map<sal_Int32, sal_Int32> aBorderWidths;
+ for (int i = 0; i < xmlXPathNodeSetGetLength(pXmlNodes); i += 2)
+ {
+ xmlNodePtr pStart = pXmlNodes->nodeTab[i];
+ xmlNodePtr pEnd = pXmlNodes->nodeTab[i + 1];
+ xmlChar* pStartX = xmlGetProp(pStart, BAD_CAST("x"));
+ xmlChar* pEndX = xmlGetProp(pEnd, BAD_CAST("x"));
+ sal_Int32 nStartX = o3tl::toInt32(reinterpret_cast<char const*>(pStartX));
+ sal_Int32 nEndX = o3tl::toInt32(reinterpret_cast<char const*>(pEndX));
+ if (nStartX != nEndX)
+ {
+ // Horizontal border.
+ continue;
+ }
+ xmlChar* pWidth = xmlGetProp(pStart->parent, BAD_CAST("width"));
+ sal_Int32 nWidth = o3tl::toInt32(reinterpret_cast<char const*>(pWidth));
+ aBorderWidths[nStartX] = nWidth;
+ }
+ xmlXPathFreeObject(pXmlObj);
+ std::vector<sal_Int32> aBorderWidthVec;
+ std::transform(aBorderWidths.begin(), aBorderWidths.end(), std::back_inserter(aBorderWidthVec),
+ [](const std::pair<sal_Int32, sal_Int32>& rPair) { return rPair.second; });
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(4), aBorderWidthVec.size());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 120
+ // - Actual : 60
+ // i.e. the left border was thin+thick, not thick+thin.
+ CPPUNIT_ASSERT_GREATER(aBorderWidthVec[1], aBorderWidthVec[0]);
+ CPPUNIT_ASSERT_GREATER(aBorderWidthVec[2], aBorderWidthVec[3]);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testDoubleBorderHorizontal)
+{
+ // Given a table with a top and bottom double border, outer is thin, inner is thick:
+ createSwDoc("double-border-horizontal.docx");
+ SwDoc* pDoc = getSwDoc();
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // When rendering table borders:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Then make sure the top border is thin+thick and the bottom border is thick+thin (from top to
+ // bottom):
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ // Collect widths of horizontal lines.
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//polyline[@style='solid']/point"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ // Vertical position -> width.
+ std::map<sal_Int32, sal_Int32> aBorderWidths;
+ for (int i = 0; i < xmlXPathNodeSetGetLength(pXmlNodes); i += 2)
+ {
+ xmlNodePtr pStart = pXmlNodes->nodeTab[i];
+ xmlNodePtr pEnd = pXmlNodes->nodeTab[i + 1];
+ xmlChar* pStartY = xmlGetProp(pStart, BAD_CAST("y"));
+ xmlChar* pEndY = xmlGetProp(pEnd, BAD_CAST("y"));
+ sal_Int32 nStartY = o3tl::toInt32(reinterpret_cast<char const*>(pStartY));
+ sal_Int32 nEndY = o3tl::toInt32(reinterpret_cast<char const*>(pEndY));
+ if (nStartY != nEndY)
+ {
+ // Vertical border.
+ continue;
+ }
+ xmlChar* pWidth = xmlGetProp(pStart->parent, BAD_CAST("width"));
+ sal_Int32 nWidth = o3tl::toInt32(reinterpret_cast<char const*>(pWidth));
+ aBorderWidths[nStartY] = nWidth;
+ }
+ xmlXPathFreeObject(pXmlObj);
+ std::vector<sal_Int32> aBorderWidthVec;
+ std::transform(aBorderWidths.begin(), aBorderWidths.end(), std::back_inserter(aBorderWidthVec),
+ [](const std::pair<sal_Int32, sal_Int32>& rPair) { return rPair.second; });
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(4), aBorderWidthVec.size());
+ CPPUNIT_ASSERT_GREATER(aBorderWidthVec[0], aBorderWidthVec[1]);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 120
+ // - Actual : 60
+ // i.e. the bottom border was thin+thick, not thick+thin.
+ CPPUNIT_ASSERT_GREATER(aBorderWidthVec[3], aBorderWidthVec[2]);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testParaBorderInCellClip)
+{
+ // Given a document which has outside-cell borders defined, which should not be visible:
+ createSwDoc("para-border-in-cell-clip.docx");
+ SwDoc* pDoc = getSwDoc();
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // When rendering those borders:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Then make sure that we have clipping setup for both paragraphs inside the table cell:
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2
+ // - Actual : 0
+ // - XPath '//clipregion/polygon' number of nodes is incorrect
+ // i.e. there was no clipping applied, leading to unexpected left/right borders.
+ assertXPath(pXmlDoc, "//clipregion/polygon"_ostr, 2);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testDoublePageBorder)
+{
+ // Given a page with a top and bottom double border, outer is thick, inner is thin:
+ createSwDoc("double-page-border.docx");
+ SwDoc* pDoc = getSwDoc();
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // When rendering that document:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Then make sure the top border is thick+thing and the bottom border is thin+thick (from top to
+ // bottom):
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ // Collect widths of horizontal lines.
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//polyline[@style='solid']/point"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ // Vertical position -> width.
+ std::map<sal_Int32, sal_Int32> aBorderWidths;
+ for (int i = 0; i < xmlXPathNodeSetGetLength(pXmlNodes); i += 2)
+ {
+ xmlNodePtr pStart = pXmlNodes->nodeTab[i];
+ xmlNodePtr pEnd = pXmlNodes->nodeTab[i + 1];
+ xmlChar* pStartY = xmlGetProp(pStart, BAD_CAST("y"));
+ xmlChar* pEndY = xmlGetProp(pEnd, BAD_CAST("y"));
+ sal_Int32 nStartY = o3tl::toInt32(reinterpret_cast<char const*>(pStartY));
+ sal_Int32 nEndY = o3tl::toInt32(reinterpret_cast<char const*>(pEndY));
+ if (nStartY != nEndY)
+ {
+ // Vertical border.
+ continue;
+ }
+ xmlChar* pWidth = xmlGetProp(pStart->parent, BAD_CAST("width"));
+ sal_Int32 nWidth = o3tl::toInt32(reinterpret_cast<char const*>(pWidth));
+ aBorderWidths[nStartY] = nWidth;
+ }
+ xmlXPathFreeObject(pXmlObj);
+ std::vector<sal_Int32> aBorderWidthVec;
+ std::transform(aBorderWidths.begin(), aBorderWidths.end(), std::back_inserter(aBorderWidthVec),
+ [](const std::pair<sal_Int32, sal_Int32>& rPair) { return rPair.second; });
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(4), aBorderWidthVec.size());
+ CPPUNIT_ASSERT_GREATER(aBorderWidthVec[1], aBorderWidthVec[0]);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 60
+ // - Actual : 15
+ // i.e. the bottom border was thick+thin, not thin+thick.
+ CPPUNIT_ASSERT_GREATER(aBorderWidthVec[2], aBorderWidthVec[3]);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testNegativePageBorder)
+{
+ // FIXME: the DPI check should be removed when either (1) the test is fixed to work with
+ // non-default DPI; or (2) unit tests on Windows are made to use svp VCL plugin.
+ if (!IsDefaultDPI())
+ return;
+
+ // Given a document with a top margin and a negative border distance:
+ createSwDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pDocShell = pTextDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Insert("test");
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ xPageStyle->setPropertyValue("TopMargin", uno::Any(static_cast<sal_Int32>(501))); // 284 twips
+ table::BorderLine2 aBorder;
+ aBorder.LineWidth = 159; // 90 twips
+ aBorder.OuterLineWidth = 159;
+ xPageStyle->setPropertyValue("TopBorder", uno::Any(aBorder));
+ sal_Int32 nTopBorderDistance = -646; // -366 twips
+ xPageStyle->setPropertyValue("TopBorderDistance", uno::Any(nTopBorderDistance));
+ nTopBorderDistance = 0;
+ xPageStyle->getPropertyValue("TopBorderDistance") >>= nTopBorderDistance;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-646), nTopBorderDistance);
+
+ // When rendering that border:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile();
+
+ // Then make sure that the negative distance pushes the horizontal borderline down:
+ MetafileXmlDump aDumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(aDumper, *xMetaFile);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 899
+ // - Actual : 524
+ // i.e. the negative border distance was rounded up to 0 in lcl_CalcBorderRect().
+ // Ideally this would be 284 (top of first page) + 284 (top margin) + 366 (border distance) =
+ // 934.
+ assertXPath(pXmlDoc, "//polyline[@style='solid']/point[1]"_ostr, "y"_ostr, "899");
+ assertXPath(pXmlDoc, "//polyline[@style='solid']/point[2]"_ostr, "y"_ostr, "899");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testNegativePageBorderNoMargin)
+{
+ // FIXME: the DPI check should be removed when either (1) the test is fixed to work with
+ // non-default DPI; or (2) unit tests on Windows are made to use svp VCL plugin.
+ if (!IsDefaultDPI())
+ return;
+
+ // Given a document with no top margin and a negative border distance:
+ createSwDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pDocShell = pTextDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Insert("test");
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ xPageStyle->setPropertyValue("TopMargin", uno::Any(static_cast<sal_Int32>(0))); // 0 twips
+ table::BorderLine2 aBorder;
+ aBorder.LineWidth = 159; // 90 twips
+ aBorder.OuterLineWidth = 159;
+ xPageStyle->setPropertyValue("TopBorder", uno::Any(aBorder));
+ sal_Int32 nTopBorderDistance = -1147; // -650 twips
+ xPageStyle->setPropertyValue("TopBorderDistance", uno::Any(nTopBorderDistance));
+
+ // When rendering that border:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile();
+
+ // Then make sure that the negative distance pushes the horizontal borderline down:
+ MetafileXmlDump aDumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(aDumper, *xMetaFile);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 899
+ // - Actual : 329
+ // i.e. this failed differently: the lack of top margin caused a second problem.
+ // Ideally this would be 284 (top of first page) + 650 (border distance) =
+ // 934.
+ assertXPath(pXmlDoc, "//polyline[@style='solid']/point[1]"_ostr, "y"_ostr, "899");
+ assertXPath(pXmlDoc, "//polyline[@style='solid']/point[2]"_ostr, "y"_ostr, "899");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testFollowTextFlowWrapInBackground)
+{
+ // Given a document with a table, and a graphic inside that table -- anchored, wrap set to
+ // through and follow-text-flow set to true:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ pDoc->getIDocumentSettingAccess().set(DocumentSettingId::USE_FORMER_TEXT_WRAPPING, true);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwInsertTableOptions aTableOptions(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(aTableOptions, 1, 1);
+ pWrtShell->MoveTable(GotoPrevTable, fnTableStart);
+ SfxItemSet aFrameSet(pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1>);
+ SwFormatAnchor aAnchor(RndStdIds::FLY_AT_CHAR);
+ aFrameSet.Put(aAnchor);
+ SwFormatSurround aSurround(text::WrapTextMode_THROUGH);
+ aFrameSet.Put(aSurround);
+ SwFormatFrameSize aSize(SwFrameSize::Fixed, 1000, 1000);
+ aFrameSet.Put(aSize);
+ SwFormatFollowTextFlow aFlow(true);
+ aFrameSet.Put(aFlow);
+ Graphic aGrf;
+
+ // When inserting that image:
+ pWrtShell->SwFEShell::Insert(OUString(), OUString(), &aGrf, &aFrameSet);
+
+ // Then make sure that the cell height grows to have space for the graphic, given that
+ // background=true is not specified.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nCellHeight
+ = getXPath(pXmlDoc, "//cell[1]/infos/bounds"_ostr, "height"_ostr).toInt32();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 1000
+ // - Actual : 396
+ // i.e. the image was larger than the containing cell.
+ CPPUNIT_ASSERT_GREATER(static_cast<sal_Int32>(1000), nCellHeight);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testPageRemoveFlyTable)
+{
+ // Given a document with a ToC and several tables, one table marked with a bookmark:
+ createSwDoc("page-remove-fly-table.odt");
+ SwDoc* pDoc = getSwDoc();
+
+ // When updating the ToC and incrementally formatting the document:
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ SfxDispatcher& rDispatcher = *pView->GetViewFrame().GetDispatcher();
+ rDispatcher.Execute(FN_UPDATE_TOX);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Reformat();
+
+ // Then make sure that the 2nd table below the bookmark has no unwanted top margin:
+ pWrtShell->GotoMark("test");
+ pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1, /*bBasicCall=*/false);
+ pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1, /*bBasicCall=*/false);
+ SwCursor* pCursor = pWrtShell->GetCursor();
+ SwTextNode* pTextNode = pCursor->GetPoint()->GetNode().GetTextNode();
+ SwFrame* pTextFrame = pTextNode->getLayoutFrame(nullptr);
+ SwTabFrame* pInnerTable = pTextFrame->FindTabFrame();
+ SwTabFrame* pOuterTable = pInnerTable->GetUpper()->FindTabFrame();
+ tools::Long nActual = pOuterTable->getFramePrintArea().Top();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 5879
+ // i.e. the problematic table had a large, unwanted/leftover top margin.
+ CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(0), nActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testPageRemoveFlyNoTable)
+{
+ createSwDoc("page-remove-fly-no-table.fodt");
+ // This never returned.
+ calcLayout();
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testNewFollowTextFlowWrapInBackground)
+{
+ // Given a document with a table, and a graphic inside that table -- anchored, wrap set to
+ // through and follow-text-flow set to true, legacy USE_FORMER_TEXT_WRAPPING is not set:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwInsertTableOptions aTableOptions(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(aTableOptions, 1, 1);
+ pWrtShell->MoveTable(GotoPrevTable, fnTableStart);
+ SfxItemSet aFrameSet(pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1>);
+ SwFormatAnchor aAnchor(RndStdIds::FLY_AT_CHAR);
+ aFrameSet.Put(aAnchor);
+ SwFormatSurround aSurround(text::WrapTextMode_THROUGH);
+ aFrameSet.Put(aSurround);
+ SwFormatFrameSize aSize(SwFrameSize::Fixed, 1000, 1000);
+ aFrameSet.Put(aSize);
+ SwFormatFollowTextFlow aFlow(true);
+ aFrameSet.Put(aFlow);
+ Graphic aGrf;
+
+ // When inserting that image:
+ pWrtShell->SwFEShell::Insert(OUString(), OUString(), &aGrf, &aFrameSet);
+
+ // Then make sure that the cell height grows to have space for the graphic, given that
+ // background=true is not specified.
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nCellHeight
+ = getXPath(pXmlDoc, "//cell[1]/infos/bounds"_ostr, "height"_ostr).toInt32();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected less than: 1000
+ // - Actual : 1120
+ // i.e. the cell height was too large, the image influenced it, which is not expected.
+ CPPUNIT_ASSERT_LESS(static_cast<sal_Int32>(1000), nCellHeight);
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/core/layout/paintfrm.cxx b/sw/qa/core/layout/paintfrm.cxx
new file mode 100644
index 000000000000..b5990648b20f
--- /dev/null
+++ b/sw/qa/core/layout/paintfrm.cxx
@@ -0,0 +1,163 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <o3tl/string_view.hxx>
+
+#include <docsh.hxx>
+#include <unotxdoc.hxx>
+
+namespace
+{
+/// Covers sw/source/core/layout/paintfrm.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/layout/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitTableBorder)
+{
+ // Given a document with a split table, table borders are defined, but cell borders are not:
+ createSwDoc("split-table-border.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+
+ // When rendering that document:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Then make sure that the master table has a bottom border and the follow table has a top
+ // border:
+ MetafileXmlDump aDumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(aDumper, *xMetaFile);
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//polyline[@style='solid']/point"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ int nHorizontalBorders = 0;
+ // Count the horizontal borders:
+ for (int i = 0; i < xmlXPathNodeSetGetLength(pXmlNodes); i += 2)
+ {
+ xmlNodePtr pStart = pXmlNodes->nodeTab[i];
+ xmlNodePtr pEnd = pXmlNodes->nodeTab[i + 1];
+ xmlChar* pStartY = xmlGetProp(pStart, BAD_CAST("y"));
+ xmlChar* pEndY = xmlGetProp(pEnd, BAD_CAST("y"));
+ sal_Int32 nStartY = o3tl::toInt32(reinterpret_cast<char const*>(pStartY));
+ sal_Int32 nEndY = o3tl::toInt32(reinterpret_cast<char const*>(pEndY));
+ if (nStartY != nEndY)
+ {
+ // Vertical border.
+ continue;
+ }
+
+ ++nHorizontalBorders;
+ }
+ xmlXPathFreeObject(pXmlObj);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 4
+ // - Actual : 2
+ // i.e. the bottom border in the master table and the top border in the follow table were
+ // missing.
+ CPPUNIT_ASSERT_EQUAL(4, nHorizontalBorders);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRTLBorderMerge)
+{
+ // Given a document with an RTL table:
+ createSwDoc("rtl-table.docx");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+
+ // When rendering that document:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Then make sure the 5 columns all have left and right vertical borders:
+ MetafileXmlDump aDumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(aDumper, *xMetaFile);
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//polyline[@style='solid']/point"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ int nVerticalBorders = 0;
+ // Count the vertical borders:
+ for (int i = 0; i < xmlXPathNodeSetGetLength(pXmlNodes); i += 2)
+ {
+ xmlNodePtr pStart = pXmlNodes->nodeTab[i];
+ xmlNodePtr pEnd = pXmlNodes->nodeTab[i + 1];
+ xmlChar* pStartY = xmlGetProp(pStart, BAD_CAST("y"));
+ xmlChar* pEndY = xmlGetProp(pEnd, BAD_CAST("y"));
+ sal_Int32 nStartY = o3tl::toInt32(reinterpret_cast<char const*>(pStartY));
+ sal_Int32 nEndY = o3tl::toInt32(reinterpret_cast<char const*>(pEndY));
+ if (nStartY == nEndY)
+ {
+ // Horizontal border.
+ continue;
+ }
+
+ ++nVerticalBorders;
+ }
+ xmlXPathFreeObject(pXmlObj);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 6
+ // - Actual : 4
+ // i.e. the 2nd and 5th vertical border was missing.
+ CPPUNIT_ASSERT_EQUAL(6, nVerticalBorders);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitTableMergedBorder)
+{
+ // Given a document with a split table, first row in frame 1 has merged cells:
+ createSwDoc("split-table-merged-border.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+
+ // When rendering that document:
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+
+ // Then make sure that the master table has a bottom border with the correct widths:
+ MetafileXmlDump aDumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(aDumper, *xMetaFile);
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//polyline[@style='solid']/point"_ostr);
+ xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
+ std::set<int> aHorizontalBorderStarts;
+ std::set<int> aHorizontalBorderEnds;
+ // Collect the horizontal borders:
+ for (int i = 0; i < xmlXPathNodeSetGetLength(pXmlNodes); i += 2)
+ {
+ xmlNodePtr pStart = pXmlNodes->nodeTab[i];
+ xmlNodePtr pEnd = pXmlNodes->nodeTab[i + 1];
+ xmlChar* pStartY = xmlGetProp(pStart, BAD_CAST("y"));
+ xmlChar* pEndY = xmlGetProp(pEnd, BAD_CAST("y"));
+ sal_Int32 nStartY = o3tl::toInt32(reinterpret_cast<char const*>(pStartY));
+ sal_Int32 nEndY = o3tl::toInt32(reinterpret_cast<char const*>(pEndY));
+ if (nStartY != nEndY)
+ {
+ // Vertical border.
+ continue;
+ }
+
+ xmlChar* pStartX = xmlGetProp(pStart, BAD_CAST("x"));
+ xmlChar* pEndX = xmlGetProp(pEnd, BAD_CAST("x"));
+ sal_Int32 nStartX = o3tl::toInt32(reinterpret_cast<char const*>(pStartX));
+ sal_Int32 nEndX = o3tl::toInt32(reinterpret_cast<char const*>(pEndX));
+ aHorizontalBorderStarts.insert(nStartX);
+ aHorizontalBorderEnds.insert(nEndX);
+ }
+ xmlXPathFreeObject(pXmlObj);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), aHorizontalBorderStarts.size());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2
+ // - Actual : 3
+ // i.e. the frame 1 bottom border ended sooner than expected, resulting in a buggy, partial
+ // bottom border.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), aHorizontalBorderEnds.size());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/sortedobjs.cxx b/sw/qa/core/layout/sortedobjs.cxx
new file mode 100644
index 000000000000..471dd48a8b0c
--- /dev/null
+++ b/sw/qa/core/layout/sortedobjs.cxx
@@ -0,0 +1,35 @@
+/* -*- 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>
+
+namespace
+{
+/// Covers sw/source/core/layout/sortedobjs.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/layout/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testSortedObjsInsert)
+{
+ // Given a document with two anchored objects, one is a fly frame in the header and the other is
+ // a group shape where one inner shape has an associated fly frame:
+ // When importing that document:
+ // Then make sure that we don't try to do binary search on an unsorted container that leads to a
+ // crash in debug builds:
+ createSwDoc("sorted-objs-insert.docx");
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/tabfrm.cxx b/sw/qa/core/layout/tabfrm.cxx
new file mode 100644
index 000000000000..9bfbd1b82e2a
--- /dev/null
+++ b/sw/qa/core/layout/tabfrm.cxx
@@ -0,0 +1,261 @@
+/* -*- 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 <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+#include <pagefrm.hxx>
+#include <tabfrm.hxx>
+#include <sortedobjs.hxx>
+#include <anchoredobject.hxx>
+#include <flyfrm.hxx>
+#include <flyfrms.hxx>
+#include <docsh.hxx>
+#include <wrtsh.hxx>
+
+namespace
+{
+/// Covers sw/source/core/layout/tabfrm.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/layout/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testTablePrintAreaLeft)
+{
+ // Given a document with a header containing an image, and also with an overlapping table:
+ createSwDoc("table-print-area-left.docx");
+
+ // When laying out that document & parsing the left margin of the table:
+ SwTwips nTablePrintLeft = parseDump("//tab/infos/prtBounds"_ostr, "left"_ostr).toInt32();
+
+ // Then make sure it has ~no left margin:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 5
+ // - Actual : 10646
+ // i.e. the table was shifted outside the page, was invisible.
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(5), nTablePrintLeft);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTableMissingJoin)
+{
+ // Given a document with a table on page 2:
+ // When laying out that document:
+ createSwDoc("table-missing-join.docx");
+
+ // Then make sure that the table fits page 2:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ SwFrame* pBody = pPage2->FindBodyCont();
+ auto pTab = pBody->GetLower()->DynCastTabFrame();
+ // Without the accompanying fix in place, this test would have failed, the table continued on
+ // page 3.
+ CPPUNIT_ASSERT(!pTab->HasFollow());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyInInlineTable)
+{
+ // Outer inline table on pages 1 -> 2 -> 3, inner floating table on pages 2 -> 3:
+ // When laying out that document:
+ createSwDoc("floattable-in-inlinetable.docx");
+
+ // Then make sure that the outer table is not missing on page 3:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ {
+ SwFrame* pBody = pPage1->FindBodyCont();
+ auto pTab = pBody->GetLower()->DynCastTabFrame();
+ CPPUNIT_ASSERT(!pTab->GetPrecede());
+ CPPUNIT_ASSERT(pTab->GetFollow());
+ }
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ {
+ SwFrame* pBody = pPage2->FindBodyCont();
+ auto pTab = pBody->GetLower()->DynCastTabFrame();
+ CPPUNIT_ASSERT(pTab->GetPrecede());
+ // Without the accompanying fix in place, this test would have failed, the outer table was
+ // missing on page 3.
+ CPPUNIT_ASSERT(pTab->GetFollow());
+ }
+ auto pPage3 = pPage2->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage3);
+ {
+ SwFrame* pBody = pPage3->FindBodyCont();
+ auto pTab = pBody->GetLower()->DynCastTabFrame();
+ CPPUNIT_ASSERT(pTab->GetPrecede());
+ CPPUNIT_ASSERT(!pTab->GetFollow());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyNestedRowSpan)
+{
+ // Given a document with nested floating tables and a row with rowspan cells at page boundary:
+ // When loading that document:
+ // Without the accompanying fix in place, this test would have resulted in a layout loop.
+ createSwDoc("floattable-nested-rowspan.docx");
+
+ // Then make sure the resulting page count matches Word:
+ CPPUNIT_ASSERT_EQUAL(6, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyTableJoin)
+{
+ // Given a document with a multi-page floating table:
+ // When loading this document:
+ createSwDoc("floattable-table-join.docx");
+
+ // Then make sure this document doesn't crash the layout and has a floating table split on 4
+ // pages:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ {
+ SwSortedObjs& rPageObjs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ auto pFly = rPageObjs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pFly);
+ // Start of the chain.
+ CPPUNIT_ASSERT(!pFly->GetPrecede());
+ CPPUNIT_ASSERT(pFly->HasFollow());
+ }
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ {
+ SwSortedObjs& rPageObjs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ auto pFly = rPageObjs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pFly);
+ CPPUNIT_ASSERT(pFly->GetPrecede());
+ CPPUNIT_ASSERT(pFly->HasFollow());
+ }
+ auto pPage3 = pPage2->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage3);
+ CPPUNIT_ASSERT(pPage3->GetSortedObjs());
+ {
+ SwSortedObjs& rPageObjs = *pPage3->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ auto pFly = rPageObjs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pFly);
+ CPPUNIT_ASSERT(pFly->GetPrecede());
+ CPPUNIT_ASSERT(pFly->HasFollow());
+ }
+ auto pPage4 = pPage3->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage4);
+ CPPUNIT_ASSERT(pPage4->GetSortedObjs());
+ SwSortedObjs& rPageObjs = *pPage4->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ auto pFly = rPageObjs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pFly);
+ // End of the chain.
+ CPPUNIT_ASSERT(pFly->GetPrecede());
+ CPPUNIT_ASSERT(!pFly->HasFollow());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyWrappedByTable)
+{
+ // Given a document with a floating table, wrapped by an inline table:
+ // When laying out the document:
+ createSwDoc("floattable-wrapped-by-table.docx");
+
+ // Then make sure the inline table wraps around the floating table:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage);
+ // Get the top of the inline table, ignoring margins:
+ CPPUNIT_ASSERT(pPage->GetSortedObjs());
+ SwSortedObjs& rPageObjs = *pPage->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ auto pFly = rPageObjs[0]->DynCastFlyFrame()->DynCastFlyAtContentFrame();
+ CPPUNIT_ASSERT(pFly);
+ // Get the bottom of the floating table, ignoring margins:
+ SwTwips nFloatingBottom = pFly->getFrameArea().Top() + pFly->getFramePrintArea().Height();
+ SwFrame* pBody = pPage->FindBodyCont();
+ auto pTab = pBody->GetLower()->GetNext()->DynCastTabFrame();
+ SwTwips nInlineTop = pTab->getFrameArea().Top() + pTab->getFramePrintArea().Top();
+ // Make sure the inline table is on the right of the floating one, not below it:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected less than: 7287
+ // - Actual : 7287
+ // i.e. the inline table was under the floating one, not on the right of it.
+ CPPUNIT_ASSERT_LESS(nFloatingBottom, nInlineTop);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testInlineTableThenSplitFly)
+{
+ // Given a document with a floating table ("right") and an inline table ("left"):
+ // When laying out the document:
+ createSwDoc("floattable-not-wrapped-by-table.docx");
+
+ // Then make sure the inline table is on the left (small negative offset):
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage);
+ SwFrame* pBody = pPage->FindBodyCont();
+ auto pTab = pBody->GetLower()->GetNext()->DynCastTabFrame();
+ SwTwips nInlineLeft = pTab->getFramePrintArea().Left();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected less than: 0
+ // - Actual : 6958
+ // i.e. "left" was on the right, its horizontal margin was not a small negative value but a
+ // large positive one.
+ CPPUNIT_ASSERT_LESS(static_cast<SwTwips>(0), nInlineLeft);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyWrappedByTableNested)
+{
+ // Given a document with 3 tables, one inline toplevel and two inner ones (one inline, one
+ // floating):
+ // When laying out that document:
+ // Without the accompanying fix in place, this test would have failed here with a layout loop.
+ createSwDoc("floattable-wrapped-by-table-nested.docx");
+
+ // Than make sure we have 3 tables, but only one of them is floating:
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pDoc->GetTableFrameFormats()->GetFormatCount());
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetSpzFrameFormats()->GetFormatCount());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyHeader)
+{
+ // Given a document with 8 pages: a first page ending in a manual page break, then a multi-page
+ // floating table on pages 2..8:
+ createSwDoc("floattable-header.docx");
+ CPPUNIT_ASSERT_EQUAL(8, getPages());
+
+ // When creating a new paragraph at doc start:
+ SwDocShell* pDocShell = getSwDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->SplitNode();
+ // Without the accompanying fix in place, this test would have crashed here.
+ pWrtShell->CalcLayout();
+
+ // Then make sure we get one more page, since the first page is now 2 pages:
+ CPPUNIT_ASSERT_EQUAL(9, getPages());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/trvlfrm.cxx b/sw/qa/core/layout/trvlfrm.cxx
new file mode 100644
index 000000000000..dc8ba54f4feb
--- /dev/null
+++ b/sw/qa/core/layout/trvlfrm.cxx
@@ -0,0 +1,56 @@
+/* -*- 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 <wrtsh.hxx>
+#include <docsh.hxx>
+#include <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+#include <node.hxx>
+
+namespace
+{
+/// Covers sw/source/core/layout/trvlfrm.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/layout/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyModelPositionForViewPointCorrection)
+{
+ // Given a 2 page floating table, 40% width, positioned on the left of the page:
+ createSwDoc("floattable-model-position-for-view-point-correction.docx");
+
+ // When clicking on the right side of the table:
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwDoc* pDoc = getSwDocShell()->GetDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ SwFrame* pPage = pLayout->GetLower();
+ SwFrame* pBody = pPage->GetLower();
+ const SwRect& rBodyRect = pBody->getFrameArea();
+ // 1 line below the top center of the body frame.
+ Point aDocPos(rBodyRect.Left() + rBodyRect.Width() / 2, rBodyRect.Top() + 220);
+ bool bOnlyText = false;
+ pWrtShell->CallSetCursor(&aDocPos, bOnlyText);
+
+ // Then make sure the cursor gets inside the table, and doesn't go to the anchor on page 2:
+ SwCursor& rCursor = pWrtShell->GetCurrentShellCursor();
+ SwTableNode* pTableNode = rCursor.GetPointNode().FindTableNode();
+ // Without the accompanying fix in place, this test would have failed, the cursor was in the
+ // anchor text node, not inside the split fly.
+ CPPUNIT_ASSERT(pTableNode);
+}
+}
+
+/* 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..410cc07f7d5d 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -11,8 +11,7 @@
#include <string_view>
-#include <unotest/macros_test.hxx>
-#include <test/bootstrapfixture.hxx>
+#include <test/unoapi_test.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
@@ -27,13 +26,13 @@
#include <com/sun/star/form/XFormsSupplier.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/script/XLibraryContainer.hpp>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/util/SearchAlgorithms2.hpp>
+#include <com/sun/star/util/SearchFlags.hpp>
#include <i18nutil/searchopt.hxx>
#include <comphelper/processfactory.hxx>
@@ -52,27 +51,24 @@
#include <docsh.hxx>
#include <unotxdoc.hxx>
-typedef tools::SvRef<SwDocShell> SwDocShellRef;
+typedef rtl::Reference<SwDocShell> SwDocShellRef;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
/* Implementation of Macros test */
-class SwMacrosTest : public test::BootstrapFixture, public unotest::MacrosTest
+class SwMacrosTest : public UnoApiTest
{
public:
SwMacrosTest();
- void createFileURL(std::u16string_view aFileBase, std::u16string_view aFileExtension, OUString& rFilePath);
-
- virtual void setUp() override;
- virtual void tearDown() override;
-
void testVba();
+ void testModernVBADelete();
void testBookmarkDeleteAndJoin();
void testBookmarkDeleteTdf90816();
void testControlShapeGrouping();
+ void testTdf151846();
void testFdo55289();
void testFdo68983();
void testFdo87530();
@@ -80,62 +76,105 @@ public:
CPPUNIT_TEST_SUITE(SwMacrosTest);
CPPUNIT_TEST(testVba);
+ CPPUNIT_TEST(testModernVBADelete);
CPPUNIT_TEST(testBookmarkDeleteAndJoin);
CPPUNIT_TEST(testBookmarkDeleteTdf90816);
CPPUNIT_TEST(testControlShapeGrouping);
+ CPPUNIT_TEST(testTdf151846);
CPPUNIT_TEST(testFdo55289);
CPPUNIT_TEST(testFdo68983);
CPPUNIT_TEST(testFdo87530);
CPPUNIT_TEST(testFindReplace);
CPPUNIT_TEST_SUITE_END();
-
-private:
- uno::Reference<uno::XInterface> m_xWriterComponent;
- OUString m_aBaseString;
};
-void SwMacrosTest::createFileURL(std::u16string_view aFileBase, std::u16string_view aFileExtension, OUString& rFilePath)
-{
- rFilePath = m_directories.getSrcRootURL() + m_aBaseString + "/" + aFileExtension + "/"
- + aFileBase + aFileExtension;
-}
-
void SwMacrosTest::testVba()
{
TestMacroInfo testInfo[] = {
{
- OUString("testVba."),
- OUString("vnd.sun.Star.script:Project.NewMacros.Macro1?language=Basic&location=document")
+ OUString("testVBA.docm"),
+ OUString("vnd.sun.Star.script:Project.ThisDocument.testAll?language=Basic&location=document")
+ },
+ {
+ OUString("testModernVBA.docm"),
+ OUString("vnd.sun.Star.script:Project.ThisDocument.testAll?language=Basic&location=document")
+ },
+ {
+ OUString("testFind.docm"),
+ OUString("vnd.sun.Star.script:Project.Module1.testAll?language=Basic&location=document")
+ },
+ {
+ OUString("testDocumentRange.docm"),
+ OUString("vnd.sun.Star.script:Project.Module1.testAll?language=Basic&location=document")
+ },
+ /*{
+ OUString("testSelectionFind.docm"),
+ OUString("vnd.sun.Star.script:Project.Module1.testAll?language=Basic&location=document")
+ },
+ {
+ //current working tests here!
+
+ OUString("testFontColor.docm"),
+ OUString("vnd.sun.Star.script:Project.ThisDocument.testAll?language=Basic&location=document")
+ }
+ // TODO - make these pass in Writer
+ {
+ OUString("testSentences.docm"),
+ OUString("vnd.sun.Star.script:Project.ThisDocument.TestAll?language=Basic&location=document")
+ },
+ {
+ OUString("testWords.docm"),
+ OUString("vnd.sun.Star.script:Project.ThisDocument.TestAll?language=Basic&location=document")
+ },
+ {
+ OUString("testParagraphFormat.docm"),
+ OUString("vnd.sun.Star.script:Project.ThisDocument.TestAll?language=Basic&location=document")
+ },*/
+ {
+ OUString("testTables.docm"),
+ OUString("vnd.sun.Star.script:Project.ThisDocument.TestAll?language=Basic&location=document")
}
+
};
- for ( size_t i=0; i<SAL_N_ELEMENTS( testInfo ); ++i )
+ for (auto const & [ sFileBaseName, sMacroUrl ] : testInfo)
{
- 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;
- Sequence< Any > aOutParam;
- Sequence< uno::Any > aParams;
-
- SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
-
- CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
- SfxObjectShell::CallXScript(xComponent, sUrl, aParams, aRet, aOutParamIndex,aOutParam);
+ OUString sFileName("docm/" + sFileBaseName);
+ loadFromFile(sFileName);
+
+ uno::Any aRet = executeMacro(sMacroUrl);
OUString aStringRes;
- aRet >>= aStringRes;
- // CPPUNIT_ASSERT_EQUAL(OUString("OK"), aStringRes);
- pFoundShell->DoClose();
+ CPPUNIT_ASSERT_MESSAGE(sFileName.toUtf8().getStr(), aRet >>= aStringRes);
+ CPPUNIT_ASSERT_EQUAL(OUString("OK"), aStringRes);
}
}
+void SwMacrosTest::testModernVBADelete()
+{
+ TestMacroInfo testInfo =
+ {
+ OUString("testModernVBADelete.docm"),
+ OUString("vnd.sun.Star.script:Project.ThisDocument.testAll?language=Basic&location=document")
+ };
+
+ OUString sFileName("docm/" + testInfo.sFileBaseName);
+ loadFromFile(sFileName);
+
+ SwXTextDocument *const pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ SwDoc *const pDoc = pTextDoc->GetDocShell()->GetDoc();
+ pDoc->GetIDocumentUndoRedo().DoUndo(true);
+ CPPUNIT_ASSERT(!pDoc->GetIDocumentUndoRedo().GetUndoActionCount());
+
+ uno::Any aRet = executeMacro(testInfo.sMacroUrl);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetIDocumentUndoRedo().GetUndoActionCount());
+
+ OUString aStringRes;
+ CPPUNIT_ASSERT(aRet >>= aStringRes);
+ CPPUNIT_ASSERT_EQUAL(OUString("OK"), aStringRes);
+}
+
void SwMacrosTest::testBookmarkDeleteAndJoin()
{
- SwDoc *const pDoc = new SwDoc;
+ rtl::Reference<SwDoc> const pDoc(new SwDoc);
pDoc->GetIDocumentUndoRedo().DoUndo(true); // bug is in SwUndoDelete
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
SwPaM aPaM(aIdx);
@@ -168,14 +207,14 @@ void SwMacrosTest::testBookmarkDeleteAndJoin()
for (IDocumentMarkAccess::const_iterator_t i = rIDMA.getAllMarksBegin(); i != rIDMA.getAllMarksEnd(); ++i)
{
// problem was that the nContent was pointing at deleted node
- CPPUNIT_ASSERT_EQUAL(static_cast<const SwContentNode*>((*i)->GetMarkStart().nContent.GetIdxReg()),
- static_cast<const SwContentNode*>((*i)->GetMarkStart().nNode.GetNode().GetContentNode()));
+ CPPUNIT_ASSERT_EQUAL((*i)->GetMarkStart().GetContentNode(),
+ static_cast<const SwContentNode*>((*i)->GetMarkStart().GetNode().GetContentNode()));
}
}
void SwMacrosTest::testBookmarkDeleteTdf90816()
{
- SwDoc *const pDoc = new SwDoc;
+ rtl::Reference<SwDoc> const pDoc(new SwDoc);
pDoc->GetIDocumentUndoRedo().DoUndo(true); // bug is in SwUndoDelete
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
SwPaM aPaM(aIdx);
@@ -205,13 +244,9 @@ void SwMacrosTest::testBookmarkDeleteTdf90816()
void SwMacrosTest::testControlShapeGrouping()
{
- OUString aFileName;
- createFileURL(u"testControlShapeGrouping.", u"odt", aFileName);
- Reference< css::lang::XComponent > xComponent(
- loadFromDesktop(aFileName, "com.sun.star.text.TextDocument"));
- CPPUNIT_ASSERT(xComponent.is());
+ loadFromFile(u"odt/testControlShapeGrouping.odt");
- uno::Reference<frame::XModel> const xModel(xComponent, UNO_QUERY);
+ uno::Reference<frame::XModel> const xModel(mxComponent, UNO_QUERY);
CPPUNIT_ASSERT(xModel.is());
uno::Reference<lang::XMultiServiceFactory> xFactory(xModel, UNO_QUERY);
uno::Reference<drawing::XDrawPageSupplier> const xDPS(xModel, UNO_QUERY);
@@ -243,7 +278,7 @@ void SwMacrosTest::testControlShapeGrouping()
UNO_QUERY);
xDateShape->setControl(xDateControlModel);
uno::Reference<beans::XPropertySet> xDateShapeProps(xDateShape, UNO_QUERY);
- xDateShapeProps->setPropertyValue("AnchorType", makeAny(text::TextContentAnchorType_AT_PARAGRAPH));
+ xDateShapeProps->setPropertyValue("AnchorType", Any(text::TextContentAnchorType_AT_PARAGRAPH));
uno::Reference<drawing::XControlShape> const xTimeShape(
xFactory->createInstance("com.sun.star.drawing.ControlShape"),
@@ -253,11 +288,11 @@ void SwMacrosTest::testControlShapeGrouping()
UNO_QUERY);
xTimeShape->setControl(xTimeControlModel);
uno::Reference<beans::XPropertySet> xTimeShapeProps(xTimeShape, UNO_QUERY);
- xTimeShapeProps->setPropertyValue("AnchorType", makeAny(text::TextContentAnchorType_AT_PARAGRAPH));
+ xTimeShapeProps->setPropertyValue("AnchorType", Any(text::TextContentAnchorType_AT_PARAGRAPH));
- xFormNC->insertByName("aDateCntrl", makeAny(xDateControlModel));
+ xFormNC->insertByName("aDateCntrl", Any(xDateControlModel));
xDPShapes->add(xDateShape);
- xFormNC->insertByName("aTimeCntrl", makeAny(xTimeControlModel));
+ xFormNC->insertByName("aTimeCntrl", Any(xTimeControlModel));
xDPShapes->add(xTimeShape);
xShapes->add(xDateShape);
@@ -305,15 +340,27 @@ void SwMacrosTest::testControlShapeGrouping()
CPPUNIT_ASSERT_EQUAL(xTS->getControl(), xTimeControlModel);
}
#endif
+}
+
+void SwMacrosTest::testTdf151846()
+{
+ loadFromFile(u"odt/tdf151846.odt");
- // close
- Reference<util::XCloseable> xDocCloseable(xComponent, UNO_QUERY_THROW);
- xDocCloseable->close(false);
+ // Without the fix in place, this test would have failed with
+ // Property or method not found: createDiagramByDataSource.
+ executeMacro("vnd.sun.Star.script:Standard.Module1.Main?language=Basic&location=document");
+
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xAccess(xTEOSupplier->getEmbeddedObjects());
+ uno::Sequence<OUString> aSeq(xAccess->getElementNames());
+
+ // Check number of embedded objects.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aSeq.getLength());
}
void SwMacrosTest::testFdo55289()
{
- SwDoc *const pDoc = new SwDoc;
+ SwDoc* const pDoc = new SwDoc;
SwDocShellRef pDocShell = new SwDocShell(*pDoc, SfxObjectCreateMode::EMBEDDED);
// this needs to run with no layout to tickle the bugs in the special
// cases in SwXShape re-anchoring
@@ -327,47 +374,32 @@ void SwMacrosTest::testFdo55289()
createInstance("com.sun.star.drawing.GraphicObjectShape"),
UNO_QUERY);
xShape->setPropertyValue("AnchorType",
- makeAny(text::TextContentAnchorType_AT_PAGE));
+ Any(text::TextContentAnchorType_AT_PAGE));
xShapes->add(uno::Reference<drawing::XShape>(xShape, UNO_QUERY));
xShape->setPropertyValue("AnchorType",
- makeAny(text::TextContentAnchorType_AT_CHARACTER));
+ Any(text::TextContentAnchorType_AT_CHARACTER));
xShape->setPropertyValue("AnchorType",
- makeAny(text::TextContentAnchorType_AS_CHARACTER));
+ Any(text::TextContentAnchorType_AS_CHARACTER));
xShape->setPropertyValue("AnchorType",
- makeAny(text::TextContentAnchorType_AT_CHARACTER));
+ Any(text::TextContentAnchorType_AT_CHARACTER));
xShape->setPropertyValue("AnchorType",
- makeAny(text::TextContentAnchorType_AS_CHARACTER));
+ Any(text::TextContentAnchorType_AS_CHARACTER));
uno::Reference<text::XTextRange> const xEnd =
uno::Reference<text::XTextDocument>(xModel, UNO_QUERY_THROW)->getText()->getEnd();
uno::Reference<text::XTextContent> const xShapeContent(xShape, UNO_QUERY);
xShapeContent->attach(xEnd);
+ pDocShell->DoClose();
}
void SwMacrosTest::testFdo68983()
{
- OUString aFileName;
- 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());
+ loadFromFile(u"odt/fdo68983.odt");
+ Reference< frame::XStorable > xDocStorable(mxComponent, UNO_QUERY_THROW);
- Reference< frame::XStorable > xDocStorable(xComponent, UNO_QUERY_THROW);
-
- utl::TempFile aTempFile;
- aTempFile.EnableKillingFile();
- Sequence<beans::PropertyValue> desc( comphelper::InitPropertySequence({
- { "FilterName", Any(OUString("writer8")) }
- }));
- xDocStorable->storeAsURL(aTempFile.GetURL(), desc);
-
- Reference<util::XCloseable>(xComponent, UNO_QUERY_THROW)->close(false);
-
- // re-load
- xComponent = loadFromDesktop(aTempFile.GetURL(), "com.sun.star.text.TextDocument");
+ saveAndReload("writer8");
// check that password-protected library survived store and re-load
- Reference<document::XEmbeddedScripts> xDocScr(xComponent, UNO_QUERY_THROW);
+ Reference<document::XEmbeddedScripts> xDocScr(mxComponent, UNO_QUERY_THROW);
Reference<script::XStorageBasedLibraryContainer> xStorBasLib(xDocScr->getBasicLibraries());
Reference<script::XLibraryContainer> xBasLib(xStorBasLib, UNO_QUERY_THROW);
Reference<script::XLibraryContainerPassword> xBasLibPwd(xStorBasLib, UNO_QUERY_THROW);
@@ -375,47 +407,29 @@ void SwMacrosTest::testFdo68983()
CPPUNIT_ASSERT(xBasLibPwd->verifyLibraryPassword("Library1", "foo"));
xBasLib->loadLibrary("Library1");
CPPUNIT_ASSERT(xBasLib->isLibraryLoaded("Library1"));
-
- // close
- Reference<util::XCloseable> xDocCloseable(xComponent, UNO_QUERY_THROW);
- xDocCloseable->close(false);
}
void SwMacrosTest::testFdo87530()
{
- Reference<css::lang::XComponent> xComponent =
- loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
-
- utl::TempFile aTempFile;
- aTempFile.EnableKillingFile();
-
- Sequence<beans::PropertyValue> desc( comphelper::InitPropertySequence({
- { "FilterName", Any(OUString("writer8")) }
- }));
+ mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
{
// insert initial password protected library
- Reference<document::XEmbeddedScripts> xDocScr(xComponent, UNO_QUERY_THROW);
+ Reference<document::XEmbeddedScripts> xDocScr(mxComponent, UNO_QUERY_THROW);
Reference<script::XStorageBasedLibraryContainer> xStorBasLib(xDocScr->getBasicLibraries());
Reference<script::XLibraryContainer> xBasLib(xStorBasLib, UNO_QUERY_THROW);
Reference<script::XLibraryContainerPassword> xBasLibPwd(xStorBasLib, UNO_QUERY_THROW);
Reference<container::XNameContainer> xLibrary(xBasLib->createLibrary("BarLibrary"));
xLibrary->insertByName("BarModule",
- uno::makeAny(OUString("Sub Main\nEnd Sub\n")));
+ uno::Any(OUString("Sub Main\nEnd Sub\n")));
xBasLibPwd->changeLibraryPassword("BarLibrary", "", "foo");
-
- Reference<frame::XStorable> xDocStorable(xComponent, UNO_QUERY_THROW);
- xDocStorable->storeAsURL(aTempFile.GetURL(), desc);
}
- Reference<util::XCloseable>(xComponent, UNO_QUERY_THROW)->close(false);
-
- // re-load
- xComponent = loadFromDesktop(aTempFile.GetURL(), "com.sun.star.text.TextDocument");
+ saveAndReload("writer8");
{
// check that password-protected library survived store and re-load
- Reference<document::XEmbeddedScripts> xDocScr(xComponent, UNO_QUERY_THROW);
+ Reference<document::XEmbeddedScripts> xDocScr(mxComponent, UNO_QUERY_THROW);
Reference<script::XStorageBasedLibraryContainer> xStorBasLib(xDocScr->getBasicLibraries());
Reference<script::XLibraryContainer> xBasLib(xStorBasLib, UNO_QUERY_THROW);
Reference<script::XLibraryContainerPassword> xBasLibPwd(xStorBasLib, UNO_QUERY_THROW);
@@ -430,21 +444,14 @@ void SwMacrosTest::testFdo87530()
// add a second module now - tdf#87530 happened here
Reference<container::XNameContainer> xFooLib(xBasLib->createLibrary("FooLibrary"));
xFooLib->insertByName("FooModule",
- uno::makeAny(OUString("Sub Main\nEnd Sub\n")));
+ uno::Any(OUString("Sub Main\nEnd Sub\n")));
xBasLibPwd->changeLibraryPassword("FooLibrary", "", "foo");
-
- // store again
- Reference<frame::XStorable> xDocStorable(xComponent, UNO_QUERY_THROW);
- xDocStorable->store();
}
- Reference<util::XCloseable>(xComponent, UNO_QUERY_THROW)->close(false);
-
- // re-load
- xComponent = loadFromDesktop(aTempFile.GetURL(), "com.sun.star.text.TextDocument");
+ saveAndReload("writer8");
// check that password-protected library survived store and re-load
- Reference<document::XEmbeddedScripts> xDocScr(xComponent, UNO_QUERY_THROW);
+ Reference<document::XEmbeddedScripts> xDocScr(mxComponent, UNO_QUERY_THROW);
Reference<script::XStorageBasedLibraryContainer> xStorBasLib(xDocScr->getBasicLibraries());
Reference<script::XLibraryContainer> xBasLib(xStorBasLib, UNO_QUERY_THROW);
Reference<script::XLibraryContainerPassword> xBasLibPwd(xStorBasLib, UNO_QUERY_THROW);
@@ -455,22 +462,16 @@ void SwMacrosTest::testFdo87530()
Reference<container::XNameContainer> xLibrary(xBasLib->getByName("FooLibrary"), UNO_QUERY);
Any module(xLibrary->getByName("FooModule"));
CPPUNIT_ASSERT_EQUAL(OUString("Sub Main\nEnd Sub\n"), module.get<OUString>());
-
- // close
- Reference<util::XCloseable>(xComponent, UNO_QUERY_THROW)->close(false);
}
void SwMacrosTest::testFindReplace()
{
// we need a full document with view and layout etc. because ::GetNode()
- Reference<lang::XComponent> const xComponent =
+ mxComponent =
loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
- const ::comphelper::ScopeGuard aComponentScopeGuard(
- [&xComponent]() { xComponent->dispose(); } );
-
- SwXTextDocument *const pTextDoc = dynamic_cast<SwXTextDocument *>(xComponent.get());
+ SwXTextDocument *const pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
SwDoc *const pDoc = pTextDoc->GetDocShell()->GetDoc();
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
@@ -487,8 +488,7 @@ void SwMacrosTest::testFindReplace()
bool bCancel(false);
i18nutil::SearchOptions2 opts(
- util::SearchAlgorithms_REGEXP,
- 65536,
+ css::util::SearchFlags::LEV_RELAXED,
"$",
"",
lang::Locale("en", "US", ""),
@@ -505,7 +505,7 @@ void SwMacrosTest::testFindReplace()
opts, false, SwDocPositions::Curr, SwDocPositions::End, bCancel, FindRanges::InBody);
CPPUNIT_ASSERT(bFound);
CPPUNIT_ASSERT(pPaM->HasMark());
- CPPUNIT_ASSERT(pPaM->GetPoint()->nNode != pPaM->GetMark()->nNode);
+ CPPUNIT_ASSERT(pPaM->GetPoint()->GetNode() != pPaM->GetMark()->GetNode());
CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_NEWLINE)), pPaM->GetText());
// now do another Find, inside the selection from the first Find
@@ -514,7 +514,7 @@ void SwMacrosTest::testFindReplace()
opts, false, SwDocPositions::Curr, SwDocPositions::End, bCancel, FindRanges::InSel);
CPPUNIT_ASSERT(bFound);
CPPUNIT_ASSERT(pPaM->HasMark());
- CPPUNIT_ASSERT(pPaM->GetPoint()->nNode != pPaM->GetMark()->nNode);
+ CPPUNIT_ASSERT(pPaM->GetPoint()->GetNode() != pPaM->GetMark()->GetNode());
CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_NEWLINE)), pPaM->GetText());
rIDCO.ReplaceRange(*pPaM, " ", true);
@@ -524,33 +524,15 @@ void SwMacrosTest::testFindReplace()
// problem was that after the 2nd Find, the wrong newline was selected
CPPUNIT_ASSERT_EQUAL(OUString("foo bar"),
- pPaM->Start()->nNode.GetNode().GetTextNode()->GetText());
+ pPaM->Start()->GetNode().GetTextNode()->GetText());
pPaM->Move(fnMoveForward, GoInNode);
CPPUNIT_ASSERT_EQUAL(OUString("baz"),
- pPaM->End()->nNode.GetNode().GetTextNode()->GetText());
+ pPaM->End()->GetNode().GetTextNode()->GetText());
}
SwMacrosTest::SwMacrosTest()
- : m_aBaseString("/sw/qa/core/data")
-{
-}
-
-void SwMacrosTest::setUp()
-{
- test::BootstrapFixture::setUp();
-
- // This is a bit of a fudge, we do this to ensure that SwGlobals::ensure,
- // which is a private symbol to us, gets called
- m_xWriterComponent =
- getMultiServiceFactory()->createInstance("com.sun.star.comp.Writer.TextDocument");
- CPPUNIT_ASSERT_MESSAGE("no writer component!", m_xWriterComponent.is());
- mxDesktop = css::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) );
-}
-
-void SwMacrosTest::tearDown()
+ : UnoApiTest("/sw/qa/core/data/")
{
- uno::Reference< lang::XComponent >( m_xWriterComponent, UNO_QUERY_THROW )->dispose();
- test::BootstrapFixture::tearDown();
}
CPPUNIT_TEST_SUITE_REGISTRATION(SwMacrosTest);
diff --git a/sw/qa/core/objectpositioning/data/floattable-follow-on-wrong-page.odt b/sw/qa/core/objectpositioning/data/floattable-follow-on-wrong-page.odt
new file mode 100644
index 000000000000..6401747fd9d3
--- /dev/null
+++ b/sw/qa/core/objectpositioning/data/floattable-follow-on-wrong-page.odt
Binary files differ
diff --git a/sw/qa/core/objectpositioning/data/floattable-overlap-cell.docx b/sw/qa/core/objectpositioning/data/floattable-overlap-cell.docx
new file mode 100644
index 000000000000..50ec605ed7b7
--- /dev/null
+++ b/sw/qa/core/objectpositioning/data/floattable-overlap-cell.docx
Binary files differ
diff --git a/sw/qa/core/objectpositioning/data/floattable-tbl-overlap.docx b/sw/qa/core/objectpositioning/data/floattable-tbl-overlap.docx
new file mode 100644
index 000000000000..b5b23931a240
--- /dev/null
+++ b/sw/qa/core/objectpositioning/data/floattable-tbl-overlap.docx
Binary files differ
diff --git a/sw/qa/core/objectpositioning/data/floattable-vert-orient-top.odt b/sw/qa/core/objectpositioning/data/floattable-vert-orient-top.odt
new file mode 100644
index 000000000000..b10f0b7188fa
--- /dev/null
+++ b/sw/qa/core/objectpositioning/data/floattable-vert-orient-top.odt
Binary files differ
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/data/tdf154863-img-move-crash.docx b/sw/qa/core/objectpositioning/data/tdf154863-img-move-crash.docx
new file mode 100644
index 000000000000..ca402edef74d
--- /dev/null
+++ b/sw/qa/core/objectpositioning/data/tdf154863-img-move-crash.docx
Binary files differ
diff --git a/sw/qa/core/objectpositioning/objectpositioning.cxx b/sw/qa/core/objectpositioning/objectpositioning.cxx
index 2a35a41f1ec2..717d63ded052 100644
--- a/sw/qa/core/objectpositioning/objectpositioning.cxx
+++ b/sw/qa/core/objectpositioning/objectpositioning.cxx
@@ -12,27 +12,43 @@
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <editeng/ulspitem.hxx>
+
#include <wrtsh.hxx>
#include <unotxdoc.hxx>
#include <docsh.hxx>
+#include <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+#include <pagefrm.hxx>
+#include <sortedobjs.hxx>
+#include <anchoredobject.hxx>
+#include <flyfrm.hxx>
+#include <frmatr.hxx>
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/objectpositioning/data/";
+#include <vcl/scheduler.hxx>
+namespace
+{
/// Covers sw/source/core/objectpositioning/ fixes.
-class SwCoreObjectpositioningTest : public SwModelTestBase
+class Test : public SwModelTestBase
{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/objectpositioning/data/")
+ {
+ }
};
-CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testOverlapCrash)
+CPPUNIT_TEST_FIXTURE(Test, testOverlapCrash)
{
// Load a document with 2 images.
- load(DATA_DIRECTORY, "overlap-crash.odt");
+ createSwDoc("overlap-crash.odt");
// Change their anchor type to to-char.
uno::Reference<beans::XPropertySet> xShape1(getShape(1), uno::UNO_QUERY);
- xShape1->setPropertyValue("AnchorType", uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
+ xShape1->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AT_CHARACTER));
uno::Reference<beans::XPropertySet> xShape2(getShape(1), uno::UNO_QUERY);
- xShape2->setPropertyValue("AnchorType", uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
+ xShape2->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AT_CHARACTER));
// Insert a new paragraph at the start.
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
@@ -42,43 +58,53 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testOverlapCrash)
pWrtShell->SplitNode();
}
-CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertPosFromBottom)
+CPPUNIT_TEST_FIXTURE(Test, testImgMoveCrash)
+{
+ createSwDoc("tdf154863-img-move-crash.docx");
+ uno::Reference<drawing::XShape> xShape(getShapeByName(u"Image26"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ xShapeProps->setPropertyValue("VertOrient", uno::Any(static_cast<sal_Int32>(0)));
+ xShapeProps->setPropertyValue("VertOrientPosition", uno::Any(static_cast<sal_Int32>(3000)));
+ Scheduler::ProcessEventsToIdle();
+ // Crash expected before assert if bug exists
+ CPPUNIT_ASSERT(true);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testVertPosFromBottom)
{
// Create a document, insert a shape and position it 1cm above the bottom of the body area.
- mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
+ createSwDoc();
uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
xShape->setSize(awt::Size(10000, 10000));
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
- xShapeProps->setPropertyValue("AnchorType",
- uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
- xShapeProps->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::NONE));
+ xShapeProps->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ xShapeProps->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::NONE));
xShapeProps->setPropertyValue("VertOrientRelation",
- uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
- xShapeProps->setPropertyValue("VertOrientPosition",
- uno::makeAny(static_cast<sal_Int32>(-11000)));
+ uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
+ xShapeProps->setPropertyValue("VertOrientPosition", uno::Any(static_cast<sal_Int32>(-11000)));
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
xDrawPageSupplier->getDrawPage()->add(xShape);
// Verify that the distance between the body and anchored object bottom is indeed around 1cm.
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
- sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32();
+ sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds"_ostr, "bottom"_ostr).toInt32();
sal_Int32 nAnchoredBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds", "bottom").toInt32();
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject/bounds"_ostr, "bottom"_ostr).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)
+CPPUNIT_TEST_FIXTURE(Test, testVertAlignBottomMargin)
{
// Create a document, insert three shapes and align it the bottom,center,top of page print area bottom.
// The size of shapes are 284 ~ 0.5cm
// The height of page print area bottom is 1134 ~ 2cm
- mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
+ createSwDoc();
uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
//Create first shape and align bottom of page print area bottom.
@@ -87,10 +113,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMargin)
xShapeBottom->setSize(awt::Size(500, 500));
uno::Reference<beans::XPropertySet> xShapePropsBottom(xShapeBottom, uno::UNO_QUERY);
xShapePropsBottom->setPropertyValue("AnchorType",
- uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
- xShapePropsBottom->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::BOTTOM));
+ uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ xShapePropsBottom->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::BOTTOM));
xShapePropsBottom->setPropertyValue("VertOrientRelation",
- uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
+ uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierBottom(mxComponent, uno::UNO_QUERY);
xDrawPageSupplierBottom->getDrawPage()->add(xShapeBottom);
@@ -100,10 +126,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMargin)
xShapeCenter->setSize(awt::Size(500, 500));
uno::Reference<beans::XPropertySet> xShapePropsCenter(xShapeCenter, uno::UNO_QUERY);
xShapePropsCenter->setPropertyValue("AnchorType",
- uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
- xShapePropsCenter->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::CENTER));
+ uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ xShapePropsCenter->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::CENTER));
xShapePropsCenter->setPropertyValue("VertOrientRelation",
- uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
+ uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierCenter(mxComponent, uno::UNO_QUERY);
xDrawPageSupplierCenter->getDrawPage()->add(xShapeCenter);
@@ -113,24 +139,30 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMargin)
xShapeTop->setSize(awt::Size(500, 500));
uno::Reference<beans::XPropertySet> xShapePropsTop(xShapeTop, uno::UNO_QUERY);
xShapePropsTop->setPropertyValue("AnchorType",
- uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
- xShapePropsTop->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::TOP));
+ uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ xShapePropsTop->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::TOP));
xShapePropsTop->setPropertyValue("VertOrientRelation",
- uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
+ uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierTop(mxComponent, uno::UNO_QUERY);
xDrawPageSupplierTop->getDrawPage()->add(xShapeTop);
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
- sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32(); //14989
- sal_Int32 nPageBottom = getXPath(pXmlDoc, "//page/infos/bounds", "bottom").toInt32(); //16123
+ sal_Int32 nBodyBottom
+ = getXPath(pXmlDoc, "//body/infos/bounds"_ostr, "bottom"_ostr).toInt32(); //14989
+ sal_Int32 nPageBottom
+ = getXPath(pXmlDoc, "//page/infos/bounds"_ostr, "bottom"_ostr).toInt32(); //16123
sal_Int32 nFirstShapeBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "bottom").toInt32(); //16124
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[1]/bounds"_ostr, "bottom"_ostr)
+ .toInt32(); //16124
sal_Int32 nSecondShapeBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "bottom").toInt32(); //15699
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds"_ostr, "bottom"_ostr)
+ .toInt32(); //15699
sal_Int32 nSecondShapeTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top").toInt32(); //15414
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds"_ostr, "top"_ostr)
+ .toInt32(); //15414
sal_Int32 nThirdShapeTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top").toInt32(); //14989
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[3]/bounds"_ostr, "top"_ostr)
+ .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);
@@ -142,10 +174,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMargin)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), nThirdShapeTop - nBodyBottom);
}
-CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMarginWithFooter)
+CPPUNIT_TEST_FIXTURE(Test, testVertAlignBottomMarginWithFooter)
{
// Load an empty document with footer.
- load(DATA_DIRECTORY, "bottom-margin-with-footer.docx");
+ createSwDoc("bottom-margin-with-footer.docx");
uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
// Insert three shapes and align it the bottom,center,top of page print area bottom.
@@ -157,10 +189,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMarginWithF
xShapeBottom->setSize(awt::Size(1000, 1000));
uno::Reference<beans::XPropertySet> xShapePropsBottom(xShapeBottom, uno::UNO_QUERY);
xShapePropsBottom->setPropertyValue("AnchorType",
- uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
- xShapePropsBottom->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::BOTTOM));
+ uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ xShapePropsBottom->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::BOTTOM));
xShapePropsBottom->setPropertyValue("VertOrientRelation",
- uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
+ uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierBottom(mxComponent, uno::UNO_QUERY);
xDrawPageSupplierBottom->getDrawPage()->add(xShapeBottom);
@@ -170,10 +202,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMarginWithF
xShapeCenter->setSize(awt::Size(1000, 1000));
uno::Reference<beans::XPropertySet> xShapePropsCenter(xShapeCenter, uno::UNO_QUERY);
xShapePropsCenter->setPropertyValue("AnchorType",
- uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
- xShapePropsCenter->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::CENTER));
+ uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ xShapePropsCenter->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::CENTER));
xShapePropsCenter->setPropertyValue("VertOrientRelation",
- uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
+ uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierCenter(mxComponent, uno::UNO_QUERY);
xDrawPageSupplierCenter->getDrawPage()->add(xShapeCenter);
@@ -183,24 +215,30 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMarginWithF
xShapeTop->setSize(awt::Size(1000, 1000));
uno::Reference<beans::XPropertySet> xShapePropsTop(xShapeTop, uno::UNO_QUERY);
xShapePropsTop->setPropertyValue("AnchorType",
- uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
- xShapePropsTop->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::TOP));
+ uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ xShapePropsTop->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::TOP));
xShapePropsTop->setPropertyValue("VertOrientRelation",
- uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
+ uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierTop(mxComponent, uno::UNO_QUERY);
xDrawPageSupplierTop->getDrawPage()->add(xShapeTop);
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
- sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32(); //14853
- sal_Int32 nPageBottom = getXPath(pXmlDoc, "//page/infos/bounds", "bottom").toInt32(); //17121
+ sal_Int32 nBodyBottom
+ = getXPath(pXmlDoc, "//body/infos/bounds"_ostr, "bottom"_ostr).toInt32(); //14853
+ sal_Int32 nPageBottom
+ = getXPath(pXmlDoc, "//page/infos/bounds"_ostr, "bottom"_ostr).toInt32(); //17121
sal_Int32 nFirstShapeBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "bottom").toInt32(); //17122
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[1]/bounds"_ostr, "bottom"_ostr)
+ .toInt32(); //17122
sal_Int32 nSecondShapeTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top").toInt32(); //15703
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds"_ostr, "top"_ostr)
+ .toInt32(); //15703
sal_Int32 nSecondShapeBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "bottom").toInt32(); //16272
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds"_ostr, "bottom"_ostr)
+ .toInt32(); //16272
sal_Int32 nThirdShapeTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top").toInt32(); //14853
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[3]/bounds"_ostr, "top"_ostr)
+ .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);
@@ -212,50 +250,62 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMarginWithF
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), nThirdShapeTop - nBodyBottom);
}
-CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testInsideOutsideVertAlignBottomMargin)
+CPPUNIT_TEST_FIXTURE(Test, testInsideOutsideVertAlignBottomMargin)
{
// Load a document, with two shapes.
// The shapes align the outside and inside of page print area bottom.
- load(DATA_DIRECTORY, "inside-outside-vert-align.docx");
+ createSwDoc("inside-outside-vert-align.docx");
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
- sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32(); //15704
- sal_Int32 nPageBottom = getXPath(pXmlDoc, "//page/infos/bounds", "bottom").toInt32(); //17121
+ sal_Int32 nBodyBottom
+ = getXPath(pXmlDoc, "//body/infos/bounds"_ostr, "bottom"_ostr).toInt32(); //15704
+ sal_Int32 nPageBottom
+ = getXPath(pXmlDoc, "//page/infos/bounds"_ostr, "bottom"_ostr).toInt32(); //17121
sal_Int32 nFirstShapeOutside
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "bottom").toInt32(); //17098
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[1]/bounds"_ostr, "bottom"_ostr)
+ .toInt32(); //17098
sal_Int32 nSecondShapeInside
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top").toInt32(); //15694
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds"_ostr, "top"_ostr)
+ .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)
+CPPUNIT_TEST_FIXTURE(Test, testVMLVertAlignBottomMargin)
{
// Load a document, with five shapes.
// The shapes align the top,center,bottom,outside and inside of page print area bottom.
// The height of page print area bottom is 4320 ~ 7.62cm.
// The size of shapes are 442 ~ 0.78cm
- load(DATA_DIRECTORY, "vml-vertical-alignment.docx");
+ createSwDoc("vml-vertical-alignment.docx");
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
- sal_Int32 nBodyBottom = getXPath(pXmlDoc, "//body/infos/bounds", "bottom").toInt32(); //11803
- sal_Int32 nPageBottom = getXPath(pXmlDoc, "//page/infos/bounds", "bottom").toInt32(); //16123
+ sal_Int32 nBodyBottom
+ = getXPath(pXmlDoc, "//body/infos/bounds"_ostr, "bottom"_ostr).toInt32(); //11803
+ sal_Int32 nPageBottom
+ = getXPath(pXmlDoc, "//page/infos/bounds"_ostr, "bottom"_ostr).toInt32(); //16123
sal_Int32 nFirstVMLShapeInside
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "top").toInt32(); //11802
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[1]/bounds"_ostr, "top"_ostr)
+ .toInt32(); //11802
sal_Int32 nSecondVMLShapeBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "bottom").toInt32(); //16124
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[2]/bounds"_ostr, "bottom"_ostr)
+ .toInt32(); //16124
sal_Int32 nThirdVMLShapeCenterBottom
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "bottom").toInt32(); //14185
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[3]/bounds"_ostr, "bottom"_ostr)
+ .toInt32(); //14185
sal_Int32 nThirdVMLShapeCenterTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top").toInt32(); //13741
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[3]/bounds"_ostr, "top"_ostr)
+ .toInt32(); //13741
sal_Int32 nFourthVMLShapeTop
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[4]/bounds", "top").toInt32(); //11802
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[4]/bounds"_ostr, "top"_ostr)
+ .toInt32(); //11802
sal_Int32 nFifthVMLShapeOutside
- = getXPath(pXmlDoc, "//SwAnchoredDrawObject[5]/bounds", "bottom").toInt32(); //16124
+ = getXPath(pXmlDoc, "//anchored/SwAnchoredDrawObject[5]/bounds"_ostr, "bottom"_ostr)
+ .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);
@@ -271,6 +321,105 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVMLVertAlignBottomMargin)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nFifthVMLShapeOutside - nPageBottom);
}
+CPPUNIT_TEST_FIXTURE(Test, testFloatingTableOverlapNever)
+{
+ // Given a document with two floating tables, positioned in a way that normally these would
+ // overlap, but SwFormatWrapInfluenceOnObjPos::mbAllowOverlap == false explicitly asks to avoid
+ // overlaps:
+ createSwDoc("floattable-tbl-overlap.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure no overlap happens:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rPage1Objs.size());
+ auto pFlyFrame1 = rPage1Objs[0]->DynCastFlyFrame();
+ auto pFlyFrame2 = rPage1Objs[1]->DynCastFlyFrame();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 2291
+ // - Actual : 2175
+ // i.e. the 2nd floating table overlapped with the first one.
+ CPPUNIT_ASSERT_GREATER(pFlyFrame1->getFrameArea().Bottom(), pFlyFrame2->getFrameArea().Top());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFloatingTableVertOrientTop)
+{
+ // Given a document with a vert-orient=from-top anchored floating table:
+ createSwDoc("floattable-vert-orient-top.odt");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure we correctly split the table to two pages:
+ // Without the accompanying fix in place, this test would have produced a layout loop.
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFloatingTableFollowWrongPage)
+{
+ // Given a document with text on 2 pages, the first page has a fly frame that can split:
+ createSwDoc("floattable-follow-on-wrong-page.odt");
+
+ // When increasing the top and bottom margins from 0.5cm to 2.5cm:
+ SwDoc* pDoc = getSwDoc();
+ SwPageDesc aStandard(pDoc->GetPageDesc(0));
+ SvxULSpaceItem aPageMargin(aStandard.GetMaster().GetULSpace());
+ aPageMargin.SetUpper(1417);
+ aPageMargin.SetLower(1417);
+ aStandard.GetMaster().SetFormatAttr(aPageMargin);
+ pDoc->ChgPageDesc(0, aStandard);
+
+ // Then make sure the first and second page has fly frames:
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage1Objs.size());
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ // Without the accompanying fix in place, this test would have failed, page 2 had no fly frame
+ // (page 3 had one).
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ const SwSortedObjs& rPage2Objs = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPage2Objs.size());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFloatingTableOverlapCell)
+{
+ // Given a document with floating tables, overlapping, but anchored to different table cells:
+ createSwDoc("floattable-overlap-cell.docx");
+
+ // When laying out the document:
+ // Without the accompanying fix in place, this resulted in a layout loop.
+ calcLayout();
+
+ // Then make sure the layout doesn't loop and results in a single page:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(!pPage1->GetNext());
+}
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/test_ToxLinkProcessor.cxx b/sw/qa/core/test_ToxLinkProcessor.cxx
index 9b690be4211a..a47762912c6c 100644
--- a/sw/qa/core/test_ToxLinkProcessor.cxx
+++ b/sw/qa/core/test_ToxLinkProcessor.cxx
@@ -40,12 +40,12 @@ public:
SwGlobals::ensure();
}
- static constexpr OUStringLiteral STYLE_NAME_1 = u"anyStyle1";
- static constexpr OUStringLiteral STYLE_NAME_2 = u"anyStyle2";
+ static constexpr OUString STYLE_NAME_1 = u"anyStyle1"_ustr;
+ static constexpr OUString STYLE_NAME_2 = u"anyStyle2"_ustr;
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 OUString URL_1 = u"#anyUrl1"_ustr;
+ static constexpr OUString URL_2 = u"#anyUrl2"_ustr;
};
const sal_uInt16 ToxLinkProcessorTest::POOL_ID_1 = 42;
@@ -56,14 +56,14 @@ 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);
+ CPPUNIT_ASSERT_MESSAGE("no links are open", !sut.m_oStartedLink);
}
void
@@ -72,15 +72,15 @@ 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);
+ CPPUNIT_ASSERT_MESSAGE("no links are open", !sut.m_oStartedLink);
// backward compatibility: the last start is closed by the first end
- CPPUNIT_ASSERT_EQUAL(OUString(STYLE_NAME_2), sut.m_ClosedLinks[0]->mINetFormat.GetINetFormat());
- CPPUNIT_ASSERT_EQUAL(OUString(URL_1), sut.m_ClosedLinks[0]->mINetFormat.GetValue());
+ CPPUNIT_ASSERT_EQUAL(STYLE_NAME_2, sut.m_ClosedLinks[0]->mINetFormat.GetINetFormat());
+ CPPUNIT_ASSERT_EQUAL(URL_1, sut.m_ClosedLinks[0]->mINetFormat.GetValue());
}
namespace {
@@ -108,10 +108,10 @@ 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());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link", STYLE_NAME_1, sut.m_ClosedLinks.at(0)->mINetFormat.GetVisitedFormat());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link", URL_1, sut.m_ClosedLinks.at(0)->mINetFormat.GetValue());
}
void
@@ -122,24 +122,24 @@ 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",
- OUString(STYLE_NAME_2), sut.m_ClosedLinks.at(0)->mINetFormat.GetVisitedFormat());
+ STYLE_NAME_2, sut.m_ClosedLinks.at(0)->mINetFormat.GetVisitedFormat());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Pool id is stored correctly in link",
POOL_ID_2, sut.m_ClosedLinks.at(0)->mINetFormat.GetINetFormatId());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link",
- OUString(URL_2), sut.m_ClosedLinks.at(0)->mINetFormat.GetValue());
+ URL_2, sut.m_ClosedLinks.at(0)->mINetFormat.GetValue());
// check second closed element
CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link",
- OUString(STYLE_NAME_1), sut.m_ClosedLinks.at(1)->mINetFormat.GetVisitedFormat());
+ STYLE_NAME_1, sut.m_ClosedLinks.at(1)->mINetFormat.GetVisitedFormat());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Pool id is stored correctly in link",
POOL_ID_1, sut.m_ClosedLinks.at(1)->mINetFormat.GetINetFormatId());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link",
- OUString(URL_1), sut.m_ClosedLinks.at(1)->mINetFormat.GetValue());
+ URL_1, sut.m_ClosedLinks.at(1)->mINetFormat.GetValue());
}
// Put the test suite in the registry
diff --git a/sw/qa/core/test_ToxMiscTest.cxx b/sw/qa/core/test_ToxMiscTest.cxx
index 22ad986aca4e..3e75f06b16bd 100644
--- a/sw/qa/core/test_ToxMiscTest.cxx
+++ b/sw/qa/core/test_ToxMiscTest.cxx
@@ -12,8 +12,6 @@
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
-using namespace sw;
-
class ToxMiscTest : public CppUnit::TestFixture
{
public:
@@ -27,7 +25,7 @@ void ToxMiscTest::testTdf73162()
{
//create Tokens with the help of input string
SwFormTokensHelper tokensHelper(
- "<LS Index Link,65535,><E# ,65535,0,10><X ,65535,\001.\001><ET ,65535,><T "
+ u"<LS Index Link,65535,><E# ,65535,0,10><X ,65535,\001.\001><ET ,65535,><T "
",65535,0,5,.,1><# ,65535,><LE ,65535,>"); //input token string
SwFormTokens formTokens = tokensHelper.GetTokens();
diff --git a/sw/qa/core/test_ToxWhitespaceStripper.cxx b/sw/qa/core/test_ToxWhitespaceStripper.cxx
index 7af8dae25184..f3c2de946773 100644
--- a/sw/qa/core/test_ToxWhitespaceStripper.cxx
+++ b/sw/qa/core/test_ToxWhitespaceStripper.cxx
@@ -41,14 +41,14 @@ class ToxWhitespaceStripperTest : public CppUnit::TestFixture
void ToxWhitespaceStripperTest::MappingCharactersToVariousStrippedStringsWorks()
{
{
- ToxWhitespaceStripper sut("abc\n");
+ ToxWhitespaceStripper sut(u"abc\n");
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), sut.GetPositionInStrippedString(0));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), sut.GetPositionInStrippedString(1));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), sut.GetPositionInStrippedString(2));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), sut.GetPositionInStrippedString(3));
}
{
- ToxWhitespaceStripper sut("abc\n\n");
+ ToxWhitespaceStripper sut(u"abc\n\n");
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), sut.GetPositionInStrippedString(0));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), sut.GetPositionInStrippedString(1));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), sut.GetPositionInStrippedString(2));
@@ -56,7 +56,7 @@ void ToxWhitespaceStripperTest::MappingCharactersToVariousStrippedStringsWorks()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), sut.GetPositionInStrippedString(4));
}
{
- ToxWhitespaceStripper sut("abc\ndef");
+ ToxWhitespaceStripper sut(u"abc\ndef");
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), sut.GetPositionInStrippedString(0));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), sut.GetPositionInStrippedString(1));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), sut.GetPositionInStrippedString(2));
@@ -69,7 +69,7 @@ void ToxWhitespaceStripperTest::MappingCharactersToVariousStrippedStringsWorks()
// 012345 6789
// 01234567
// " abc def"
- ToxWhitespaceStripper sut(" abc \ndef");
+ ToxWhitespaceStripper sut(u" abc \ndef");
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), sut.GetPositionInStrippedString(0));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), sut.GetPositionInStrippedString(1));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), sut.GetPositionInStrippedString(2));
@@ -86,34 +86,34 @@ void ToxWhitespaceStripperTest::MappingCharactersToVariousStrippedStringsWorks()
void ToxWhitespaceStripperTest::StrippingWhitespacesFromVariousStringsWorks()
{
{
- ToxWhitespaceStripper sut("abc\n");
+ ToxWhitespaceStripper sut(u"abc\n");
CPPUNIT_ASSERT_EQUAL(OUString("abc"), sut.GetStrippedString());
}
{
- ToxWhitespaceStripper sut("abc\n\n");
+ ToxWhitespaceStripper sut(u"abc\n\n");
CPPUNIT_ASSERT_EQUAL(OUString("abc"), sut.GetStrippedString());
}
{
- ToxWhitespaceStripper sut("abc\ndef");
+ ToxWhitespaceStripper sut(u"abc\ndef");
CPPUNIT_ASSERT_EQUAL(OUString("abc def"), sut.GetStrippedString());
}
{
- ToxWhitespaceStripper sut(" abc \ndef");
+ ToxWhitespaceStripper sut(u" abc \ndef");
CPPUNIT_ASSERT_EQUAL(OUString(" abc def"), sut.GetStrippedString());
}
{
- ToxWhitespaceStripper sut(" ");
+ ToxWhitespaceStripper sut(u" ");
CPPUNIT_ASSERT_EQUAL(OUString(""), sut.GetStrippedString());
}
{
- ToxWhitespaceStripper sut("d ");
+ ToxWhitespaceStripper sut(u"d ");
CPPUNIT_ASSERT_EQUAL(OUString("d"), sut.GetStrippedString());
}
}
void ToxWhitespaceStripperTest::PositionAfterStringCanBeRequested()
{
- OUString const test("abc");
+ OUString constexpr test(u"abc"_ustr);
ToxWhitespaceStripper sut(test);
sal_Int32 expected = test.getLength();
CPPUNIT_ASSERT_EQUAL(expected, sut.GetPositionInStrippedString(test.getLength()));
@@ -121,7 +121,7 @@ void ToxWhitespaceStripperTest::PositionAfterStringCanBeRequested()
void ToxWhitespaceStripperTest::InvalidPositionIsMappedToLastEntry()
{
- ToxWhitespaceStripper sut("ab c");
+ ToxWhitespaceStripper sut(u"ab c");
sal_Int32 const expected = 4; // the length of the string after merging the two whitespaces
sal_Int32 result
= sut.GetPositionInStrippedString(40); // a value past the original string length
diff --git a/sw/qa/core/test_rect.cxx b/sw/qa/core/test_rect.cxx
new file mode 100644
index 000000000000..cfb9fa63a04f
--- /dev/null
+++ b/sw/qa/core/test_rect.cxx
@@ -0,0 +1,107 @@
+/* -*- 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 <cppunit/TestAssert.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <swrect.hxx>
+
+class RectUnittest : public CppUnit::TestFixture
+{
+public:
+ void testBasic();
+ void testUnion();
+ void testIntersection();
+
+ CPPUNIT_TEST_SUITE(RectUnittest);
+ CPPUNIT_TEST(testBasic);
+ CPPUNIT_TEST(testUnion);
+ CPPUNIT_TEST(testIntersection);
+ CPPUNIT_TEST_SUITE_END();
+};
+
+void RectUnittest::testBasic()
+{
+ SwRect rect(Point(10, 15), Size(20, 25));
+
+ CPPUNIT_ASSERT_EQUAL(rect, SwRect(10, 15, 20, 25));
+ CPPUNIT_ASSERT_EQUAL(rect, SwRect(Point(10, 15), Point(10 + 20 - 1, 15 + 25 - 1)));
+
+ CPPUNIT_ASSERT_EQUAL(tools::Long(20), rect.Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(25), rect.Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(10), rect.Left());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(15), rect.Top());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(10 + 20 - 1), rect.Right());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(15 + 25 - 1), rect.Bottom());
+
+ CPPUNIT_ASSERT_EQUAL(Point(rect.Left(), rect.Top()), rect.TopLeft());
+ CPPUNIT_ASSERT_EQUAL(Point(rect.Right(), rect.Top()), rect.TopRight());
+ CPPUNIT_ASSERT_EQUAL(Point(rect.Left(), rect.Bottom()), rect.BottomLeft());
+ CPPUNIT_ASSERT_EQUAL(Point(rect.Right(), rect.Bottom()), rect.BottomRight());
+}
+
+void RectUnittest::testUnion()
+{
+ SwRect rect1(Point(10, 10), Size(10, 10));
+ SwRect rect2(Point(15, 15), Size(10, 10));
+ SwRect rect3(Point(30, 30), Size(10, 10));
+ SwRect tmp;
+
+ tmp = rect1;
+ tmp.Union(rect2);
+ CPPUNIT_ASSERT_EQUAL(SwRect(Point(10, 10), Size(15, 15)), tmp);
+ CPPUNIT_ASSERT_EQUAL(SwRect(Point(10, 10), Size(15, 15)), rect1.GetUnion(rect2));
+
+ tmp = rect1;
+ tmp.Union(rect3);
+ CPPUNIT_ASSERT_EQUAL(SwRect(Point(10, 10), Size(30, 30)), tmp);
+ CPPUNIT_ASSERT_EQUAL(SwRect(Point(10, 10), Size(30, 30)), rect1.GetUnion(rect3));
+
+ tmp = rect1;
+ tmp.Union(SwRect());
+ CPPUNIT_ASSERT_EQUAL(rect1, tmp);
+ CPPUNIT_ASSERT_EQUAL(rect1, rect1.GetUnion(SwRect()));
+ tmp = SwRect();
+ tmp.Union(rect1);
+ CPPUNIT_ASSERT_EQUAL(rect1, tmp);
+ CPPUNIT_ASSERT_EQUAL(rect1, SwRect().GetUnion(rect1));
+}
+
+void RectUnittest::testIntersection()
+{
+ SwRect rect1(Point(10, 10), Size(10, 10));
+ SwRect rect2(Point(15, 15), Size(10, 10));
+ SwRect rect3(Point(30, 30), Size(10, 10));
+ SwRect tmp;
+
+ tmp = rect1;
+ tmp.Intersection(rect2);
+ CPPUNIT_ASSERT_EQUAL(SwRect(Point(15, 15), Size(5, 5)), tmp);
+ CPPUNIT_ASSERT_EQUAL(SwRect(Point(15, 15), Size(5, 5)), rect1.GetIntersection(rect2));
+
+ tmp = rect1;
+ tmp.Intersection(rect3);
+ CPPUNIT_ASSERT(tmp.IsEmpty());
+ CPPUNIT_ASSERT(rect1.GetIntersection(rect3).IsEmpty());
+
+ tmp = rect1;
+ tmp.Intersection(SwRect());
+ CPPUNIT_ASSERT(tmp.IsEmpty());
+ CPPUNIT_ASSERT(rect1.GetIntersection(SwRect()).IsEmpty());
+ tmp = SwRect();
+ tmp.Intersection(rect1);
+ CPPUNIT_ASSERT(tmp.IsEmpty());
+ CPPUNIT_ASSERT(SwRect().GetIntersection(rect1).IsEmpty());
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(RectUnittest);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/test_region.cxx b/sw/qa/core/test_region.cxx
new file mode 100644
index 000000000000..15fa398c7e4a
--- /dev/null
+++ b/sw/qa/core/test_region.cxx
@@ -0,0 +1,108 @@
+/* -*- 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 <cppunit/TestAssert.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <swregion.hxx>
+#include <vcl/region.hxx>
+
+class RegionUnittest : public CppUnit::TestFixture
+{
+public:
+ void testCompress();
+ void testInvert();
+
+ CPPUNIT_TEST_SUITE(RegionUnittest);
+ CPPUNIT_TEST(testCompress);
+ CPPUNIT_TEST(testInvert);
+ CPPUNIT_TEST_SUITE_END();
+};
+
+void RegionUnittest::testCompress()
+{
+ SwRegionRects region;
+
+ // All inside each other, check it'll compress them to the largest one.
+ region = SwRegionRects();
+ region += SwRect(Point(10, 10), Size(10, 10));
+ region += SwRect(Point(10, 10), Size(20, 20));
+ region += SwRect(Point(10, 10), Size(100, 100));
+ region += SwRect(Point(10, 10), Size(50, 50));
+ region.Compress(SwRegionRects::CompressExact);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), region.size());
+ CPPUNIT_ASSERT_EQUAL(SwRect(Point(10, 10), Size(100, 100)), region[0]);
+
+ // Check merging of adjacent rectangles. This will merge first two groups
+ // and then those two merged rects only in the next iteration.
+ region = SwRegionRects();
+ region += SwRect(Point(10, 10), Size(10000, 10000));
+ region += SwRect(Point(10010, 10), Size(10000, 10000));
+ region += SwRect(Point(10, 10010), Size(10000, 10000));
+ region += SwRect(Point(10010, 10010), Size(10000, 10000));
+ region.Compress(SwRegionRects::CompressExact);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), region.size());
+ CPPUNIT_ASSERT_EQUAL(SwRect(Point(10, 10), Size(20000, 20000)), region[0]);
+
+ // Check fuzzy compress, two almost aligned rects will be compressed to one.
+ region = SwRegionRects();
+ region += SwRect(Point(10, 10), Size(100, 100));
+ region += SwRect(Point(110, 10), Size(100, 90));
+ region.Compress(SwRegionRects::CompressExact);
+ CPPUNIT_ASSERT_EQUAL(size_t(2), region.size());
+ region.Compress(SwRegionRects::CompressFuzzy);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), region.size());
+ CPPUNIT_ASSERT_EQUAL(SwRect(Point(10, 10), Size(200, 100)), region[0]);
+
+ // Check it doesn't crash because of empty size.
+ region = SwRegionRects();
+ region += SwRect(Point(0, 0), Size(0, 0));
+ region += SwRect(Point(10, 10), Size(0, 0));
+ region += SwRect(Point(100, 100), Size(0, 0));
+ region.Compress(SwRegionRects::CompressExact);
+ region.Compress(SwRegionRects::CompressFuzzy);
+}
+
+void RegionUnittest::testInvert()
+{
+ // Check that punching holes and inverting has the same result as adding up rects.
+ const SwRect fullRect(Point(100, 100), Size(1000, 1000));
+ const SwRect rects[]
+ = { { Point(200, 200), Size(200, 200) },
+ { Point(0, 0), Size(200, 200) }, // this one is intentionally partially out of bounds
+ { Point(700, 760), Size(20, 150) },
+ { Point(100, 300), Size(200, 200) },
+ { Point(100, 800), Size(10, 10) }, // these two partially overlap
+ { Point(105, 805), Size(10, 10) } };
+ SwRegionRects region1(fullRect);
+ for (const SwRect& rect : rects)
+ region1 -= rect;
+ region1.Invert();
+ region1.Compress(SwRegionRects::CompressExact);
+ SwRegionRects region2;
+ region2.ChangeOrigin(fullRect);
+ for (const SwRect& rect : rects)
+ region2 += rect;
+ region2.LimitToOrigin();
+ region2.Compress(SwRegionRects::CompressExact);
+ // The regions should be the same area, but not necessarily the same representation.
+ // SwRegionRects cannot compare those easily, but vcl::Region can.
+ vcl::Region vclRegion1, vclRegion2;
+ for (const SwRect& rect : region1)
+ vclRegion1.Union(tools::Rectangle(rect.Pos(), rect.SSize()));
+ for (const SwRect& rect : region2)
+ vclRegion2.Union(tools::Rectangle(rect.Pos(), rect.SSize()));
+ CPPUNIT_ASSERT_EQUAL(vclRegion1, vclRegion2);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(RegionUnittest);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/text/data/A011-charheight.rtf b/sw/qa/core/text/data/A011-charheight.rtf
new file mode 100644
index 000000000000..4b56ecdd6a15
--- /dev/null
+++ b/sw/qa/core/text/data/A011-charheight.rtf
@@ -0,0 +1,27 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang3079\deflangfe3079\themelang3079\themelangfe0\themelangcs0
+{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2Times New Roman{\*\falt Arial};}
+}
+{\*\defchp \f0\fs22\lang3079\langfe1033\langfenp1033 }
+{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }
+\noqfpromote
+{\stylesheet
+{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0
+\f0\fs23\lang3079\langfe1033\cgrid\langnp3079\langfenp1033 \snext0 \sqformat \spriority0 Normal;}
+{\s15\ql \li0\ri0\widctlpar\tqc\tx4536\tqr\tx9072\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f0\fs23\lang3079\langfe1033\cgrid\langnp3079\langfenp1033
+\sbasedon0 \snext15 \slink16 \sunhideused header;}
+{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \slink15 \slocked Kopfzeile Zchn;}
+}
+\paperw11906\paperh16838\margl1417\margr1417\margt1417\margb1134\gutter0\ltrsect
+\deftab708\widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0
+\showxmlerrors1\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1417\dgvorigin1417\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
+\asianbrkrule\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
+{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0
+
+\ltrpar \pard\plain \ltrpar\s15\qc \li0\ri0\widctlpar
+\tqc\tx4536\tqr\tx9072\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \f0\fs23\lang3079\langfe1033\cgrid\langnp3079\langfenp1033 {\rtlch\fcs1 \af0\afs16 \ltrch\fcs0
+\fs16 \line \line \line
+\par \line
+\par }
+}
diff --git a/sw/qa/core/text/data/Broken indent demo.odt b/sw/qa/core/text/data/Broken indent demo.odt
new file mode 100644
index 000000000000..af5928bfa556
--- /dev/null
+++ b/sw/qa/core/text/data/Broken indent demo.odt
Binary files differ
diff --git a/sw/qa/core/text/data/clearing-break-header.fodt b/sw/qa/core/text/data/clearing-break-header.fodt
new file mode 100644
index 000000000000..2bdbcd3c7567
--- /dev/null
+++ b/sw/qa/core/text/data/clearing-break-header.fodt
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties fo:margin-left="0.318cm" fo:margin-right="0.318cm" fo:margin-top="0cm" fo:margin-bottom="0cm" style:run-through="background" 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:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:stroke="none" svg:stroke-width="0cm" draw:fill="none" draw:textarea-horizontal-align="center" draw:textarea-vertical-align="bottom" draw:auto-grow-height="false" style:run-through="background"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" fo:margin-top="1.251cm" fo:margin-bottom="2.54cm" fo:margin-left="2.501cm" fo:margin-right="2.501cm">
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties fo:min-height="1.289cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="1.189cm" style:dynamic-spacing="true"/>
+ </style:header-style>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ <style:header>
+ <text:p><draw:g text:anchor-type="char" draw:z-index="1" draw:style-name="gr1"><draw:rect draw:style-name="gr2" svg:width="8.347cm" svg:height="8.908cm" svg:x="11.871cm" svg:y="21.243cm"><text:p/></draw:rect></draw:g></text:p>
+ <text:p/>
+ </style:header>
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p><text:line-break loext:clear="all"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/data/clearing-break-start.fodt b/sw/qa/core/text/data/clearing-break-start.fodt
new file mode 100644
index 000000000000..f2df00fadd4f
--- /dev/null
+++ b/sw/qa/core/text/data/clearing-break-start.fodt
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="fr1" style:family="graphic">
+ <style:graphic-properties fo:margin-left="0.318cm" fo:margin-right="0.318cm" fo:margin-top="0cm" fo:margin-bottom="0cm" style:wrap="parallel" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p><draw:frame draw:style-name="fr1" draw:name="Picture 1" text:anchor-type="char" svg:x="0cm" svg:y="0cm" svg:width="1.806cm" svg:height="1.806cm" draw:z-index="0"><draw:image draw:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+ UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+ AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+ AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+ BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+ cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+ /878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+ QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+ YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+ 2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+ cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+ AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+ hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+ 5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+ AABJRU5ErkJggg==
+ </office:binary-data></draw:image></draw:frame>X</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/data/clearing-break.fodt b/sw/qa/core/text/data/clearing-break.fodt
new file mode 100644
index 000000000000..a2f12850642c
--- /dev/null
+++ b/sw/qa/core/text/data/clearing-break.fodt
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="fr1" style:family="graphic">
+ <style:graphic-properties fo:margin-left="0.318cm" fo:margin-right="0.318cm" fo:margin-top="0cm" fo:margin-bottom="0cm" style:wrap="parallel" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p><draw:frame draw:style-name="fr1" draw:name="Picture 1" text:anchor-type="char" svg:x="0cm" svg:y="0cm" svg:width="1.806cm" svg:height="1.806cm" draw:z-index="0"><draw:image draw:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+ UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+ AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+ AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+ BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+ cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+ /878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+ QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+ YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+ 2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+ cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+ AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+ hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+ 5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+ AABJRU5ErkJggg==
+ </office:binary-data></draw:image></draw:frame>AB</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/data/content-control-header.docx b/sw/qa/core/text/data/content-control-header.docx
new file mode 100644
index 000000000000..c65ac1d41cac
--- /dev/null
+++ b/sw/qa/core/text/data/content-control-header.docx
Binary files differ
diff --git a/sw/qa/core/text/data/empty-numbering-page-split.fodt b/sw/qa/core/text/data/empty-numbering-page-split.fodt
new file mode 100644
index 000000000000..517ad2e0fb26
--- /dev/null
+++ b/sw/qa/core/text/data/empty-numbering-page-split.fodt
@@ -0,0 +1,62 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:font-size="12pt"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties fo:font-size="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.212cm"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:break-before="page"/>
+ </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-style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="Intro">
+ <style:paragraph-properties style:page-number="1"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm"/>
+ <style:header-style>
+ <style:header-footer-properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0cm"/>
+ </style:header-style>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="0.6cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm" style:dynamic-spacing="false"/>
+ </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" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm"/>
+ <style:header-style>
+ <style:header-footer-properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.499cm"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" style:next-style-name="Intro">
+ <style:header>
+ <text:p/>
+ </style:header>
+ <style:footer>
+ <text:p/>
+ </style:footer>
+ </style:master-page>
+ <style:master-page style:name="Intro" style:page-layout-name="pm2"/>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <text:h text:style-name="Heading_20_1" text:outline-level="1"/>
+ <text:p text:style-name="P1"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/data/empty-superscript.docx b/sw/qa/core/text/data/empty-superscript.docx
new file mode 100644
index 000000000000..2eea0b08715a
--- /dev/null
+++ b/sw/qa/core/text/data/empty-superscript.docx
Binary files differ
diff --git a/sw/qa/core/text/data/firstLineIndent-withFlag.fodt b/sw/qa/core/text/data/firstLineIndent-withFlag.fodt
new file mode 100644
index 000000000000..069b960b9d6f
--- /dev/null
+++ b/sw/qa/core/text/data/firstLineIndent-withFlag.fodt
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:settings>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="paragraph">
+ <style:text-properties style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" fo:hyphenate="false"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="5.5mm" fo:line-height="100%" fo:text-indent="0cm" style:auto-text-indent="true"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:line-height="200%" fo:text-indent="0cm" style:auto-text-indent="true"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1">LibreOffice is a free and powerful office suite, and a successor to OpenOffice.org (commonly known as OpenOffice). Its clean interface and feature-rich tools help you unleash your creativity and enhance your productivity. LibreOffice is one of the friendliest and fastest-growing projects in the free and open source software world.</text:p>
+ <text:p text:style-name="P2">LibreOffice is a free and powerful office suite, and a successor to OpenOffice.org (commonly known as OpenOffice). Its clean interface and feature-rich tools help you unleash your creativity and enhance your productivity. LibreOffice is one of the friendliest and fastest-growing projects in the free and open source software world.</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/data/floattable-anchor-height.docx b/sw/qa/core/text/data/floattable-anchor-height.docx
new file mode 100644
index 000000000000..3052f0daef73
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-anchor-height.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-anchor-left-margin.docx b/sw/qa/core/text/data/floattable-anchor-left-margin.docx
new file mode 100644
index 000000000000..aa55a0ce3001
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-anchor-left-margin.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-anchor-next-page.docx b/sw/qa/core/text/data/floattable-anchor-next-page.docx
new file mode 100644
index 000000000000..898c5514c587
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-anchor-next-page.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-avoid-last-manip-ofst.docx b/sw/qa/core/text/data/floattable-avoid-last-manip-ofst.docx
new file mode 100644
index 000000000000..017b3001b813
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-avoid-last-manip-ofst.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-avoid-manip-ofst.docx b/sw/qa/core/text/data/floattable-avoid-manip-ofst.docx
new file mode 100644
index 000000000000..b4d85b5f8ac4
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-avoid-manip-ofst.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-bad-fly-pos.docx b/sw/qa/core/text/data/floattable-bad-fly-pos.docx
new file mode 100644
index 000000000000..a0a8bb4dbdb9
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-bad-fly-pos.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-leftover-para-portion.docx b/sw/qa/core/text/data/floattable-leftover-para-portion.docx
new file mode 100644
index 000000000000..51eee56cf003
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-leftover-para-portion.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-negative-vert-offset-empty.docx b/sw/qa/core/text/data/floattable-negative-vert-offset-empty.docx
new file mode 100644
index 000000000000..132fde553825
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-negative-vert-offset-empty.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-negative-vert-offset.docx b/sw/qa/core/text/data/floattable-negative-vert-offset.docx
new file mode 100644
index 000000000000..688b5b8c1188
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-negative-vert-offset.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-overlap.docx b/sw/qa/core/text/data/floattable-overlap.docx
new file mode 100644
index 000000000000..cc0dbd077f00
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-overlap.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-wrap-empty-para-legacy.docx b/sw/qa/core/text/data/floattable-wrap-empty-para-legacy.docx
new file mode 100644
index 000000000000..c62a25a193a7
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-wrap-empty-para-legacy.docx
Binary files differ
diff --git a/sw/qa/core/text/data/floattable-wrap-empty-para.docx b/sw/qa/core/text/data/floattable-wrap-empty-para.docx
new file mode 100644
index 000000000000..91e8a141c15a
--- /dev/null
+++ b/sw/qa/core/text/data/floattable-wrap-empty-para.docx
Binary files differ
diff --git a/sw/qa/core/text/data/fly-minimal-wrap.docx b/sw/qa/core/text/data/fly-minimal-wrap.docx
new file mode 100644
index 000000000000..f5955d29d0ed
--- /dev/null
+++ b/sw/qa/core/text/data/fly-minimal-wrap.docx
Binary files differ
diff --git a/sw/qa/core/text/data/hide-whitespace-widorp.odt b/sw/qa/core/text/data/hide-whitespace-widorp.odt
new file mode 100644
index 000000000000..a073f36a70a8
--- /dev/null
+++ b/sw/qa/core/text/data/hide-whitespace-widorp.odt
Binary files differ
diff --git a/sw/qa/core/text/data/image.png b/sw/qa/core/text/data/image.png
new file mode 100644
index 000000000000..49e71b07ae8b
--- /dev/null
+++ b/sw/qa/core/text/data/image.png
Binary files differ
diff --git a/sw/qa/core/text/data/line-height.fodt b/sw/qa/core/text/data/line-height.fodt
new file mode 100644
index 000000000000..d784ec241bed
--- /dev/null
+++ b/sw/qa/core/text/data/line-height.fodt
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics"/>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="84.1cm" fo:page-height="118.9cm" fo:margin-top="0cm" fo:margin-bottom="0cm" fo:margin-left="0cm" fo:margin-right="0cm"/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char" svg:width="84.1cm" svg:height="118.9cm" draw:z-index="0"><draw:image draw:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+ UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+ AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+ AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+ BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+ cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+ /878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+ QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+ YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+ 2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+ cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+ AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+ hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+ 5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+ AABJRU5ErkJggg==
+ </office:binary-data></draw:image></draw:frame></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/data/line-width.fodt b/sw/qa/core/text/data/line-width.fodt
new file mode 100644
index 000000000000..a6b2b2f5c62b
--- /dev/null
+++ b/sw/qa/core/text/data/line-width.fodt
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics"/>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-height="84.1cm" fo:page-width="118.9cm" fo:margin-top="0cm" fo:margin-bottom="0cm" fo:margin-left="0cm" fo:margin-right="0cm"/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char" svg:height="84.1cm" svg:width="118.9cm" draw:z-index="0"><draw:image draw:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+ UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+ AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+ AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+ BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+ cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+ /878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+ QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+ YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+ 2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+ cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+ AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+ hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+ 5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+ AABJRU5ErkJggg==
+ </office:binary-data></draw:image></draw:frame></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/data/number-portion-format.odt b/sw/qa/core/text/data/number-portion-format.odt
new file mode 100644
index 000000000000..19b23ae84420
--- /dev/null
+++ b/sw/qa/core/text/data/number-portion-format.odt
Binary files differ
diff --git a/sw/qa/core/text/data/number-portion-noformat.docx b/sw/qa/core/text/data/number-portion-noformat.docx
new file mode 100644
index 000000000000..b289b9c69ef4
--- /dev/null
+++ b/sw/qa/core/text/data/number-portion-noformat.docx
Binary files differ
diff --git a/sw/qa/core/text/data/para-upper-margin-fly-intersect.docx b/sw/qa/core/text/data/para-upper-margin-fly-intersect.docx
new file mode 100644
index 000000000000..e8e767fb3897
--- /dev/null
+++ b/sw/qa/core/text/data/para-upper-margin-fly-intersect.docx
Binary files differ
diff --git a/sw/qa/core/text/data/placeholder.fodt b/sw/qa/core/text/data/placeholder.fodt
new file mode 100644
index 000000000000..01cb60437618
--- /dev/null
+++ b/sw/qa/core/text/data/placeholder.fodt
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:p><text:placeholder text:placeholder-type="text" text:description="reference text">&lt;placeholder text&gt;</text:placeholder></text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/core/text/data/ruby.fodt b/sw/qa/core/text/data/ruby.fodt
new file mode 100644
index 000000000000..b5a0e23d2c53
--- /dev/null
+++ b/sw/qa/core/text/data/ruby.fodt
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ </office:font-face-decls>
+ <office:styles>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Ru1" style:family="ruby">
+ <style:ruby-properties style:ruby-align="left" style:ruby-position="above" loext:ruby-position="above"/>
+ </style:style>
+ <style:style style:name="Ru2" style:family="ruby">
+ <style:ruby-properties style:ruby-align="center" style:ruby-position="above" loext:ruby-position="above"/>
+ </style:style>
+ <style:style style:name="Ru3" style:family="ruby">
+ <style:ruby-properties style:ruby-align="right" style:ruby-position="above" loext:ruby-position="above"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="P1">Ruby test: <text:ruby text:style-name="Ru1"><text:ruby-base>base text</text:ruby-base><text:ruby-text text:style-name="Rubies">ruby (left)</text:ruby-text></text:ruby> <text:ruby text:style-name="Ru2"><text:ruby-base>base text</text:ruby-base><text:ruby-text>ruby (center)</text:ruby-text></text:ruby> <text:ruby text:style-name="Ru3"><text:ruby-base>base text</text:ruby-base><text:ruby-text>ruby (right)</text:ruby-text></text:ruby></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/data/scriptinfo-surrogate-pairs.fodt b/sw/qa/core/text/data/scriptinfo-surrogate-pairs.fodt
new file mode 100644
index 000000000000..ceee84b55ff5
--- /dev/null
+++ b/sw/qa/core/text/data/scriptinfo-surrogate-pairs.fodt
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 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" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2023-07-27T18:43:02.537801624</meta:creation-date><dc:date>2023-07-27T18:43:53.298342476</dc:date><meta:editing-duration>PT51S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="1" meta:character-count="3" meta:non-whitespace-character-count="3"/><meta:generator>LibreOfficeDev/24.2.0.0.alpha0$MacOSX_X86_64 LibreOffice_project/cf8f7b91f41821b79495c0388359c4cb1156ea67</meta:generator></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaWidth" config:type="long">17805</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">9950</config:config-item>
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+ <config:config-item config:name="ViewLeft" config:type="long">3332</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">2501</config:config-item>
+ <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="long">17803</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">9948</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
+ <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ZoomFactor" config:type="short">200</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseVariableWidthNBSP" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HyphenateURLs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DropCapPunctuation" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">162604</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">1</config:config-item>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">162604</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Arial Unicode MS" svg:font-family="&apos;Arial Unicode MS&apos;" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Arial Unicode MS1" svg:font-family="&apos;Arial Unicode MS&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="PingFang SC" svg:font-family="&apos;PingFang SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Songti SC" svg:font-family="&apos;Songti SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="8.5pt" draw:shadow-offset-y="8.5pt" draw:start-line-spacing-horizontal="8.02pt" draw:start-line-spacing-vertical="8.02pt" draw:end-line-spacing-horizontal="8.02pt" draw:end-line-spacing-vertical="8.02pt" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0pt" 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="en" fo:country="EG" style:letter-kerning="true" style:font-name-asian="Songti SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Arial Unicode MS1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="35.46pt" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="EG" style:letter-kerning="true" style:font-name-asian="Songti SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Arial Unicode MS1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="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="11.99pt" fo:margin-bottom="6.01pt" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="PingFang SC" style:font-family-asian="&apos;PingFang SC&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Arial Unicode MS1" style:font-family-complex="&apos;Arial Unicode MS&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0pt" fo:margin-bottom="7pt" style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Arial Unicode MS" style:font-family-complex="&apos;Arial Unicode MS&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="6.01pt" fo:margin-bottom="6.01pt" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Arial Unicode MS" style:font-family-complex="&apos;Arial Unicode MS&apos;" style:font-family-generic-complex="swiss" style:font-size-complex="12pt" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Arial Unicode MS" style:font-family-complex="&apos;Arial Unicode MS&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="14.14pt" style:num-format="1" text:number-position="left" text:increment="5"/>
+ <loext:theme loext:name="Office Theme">
+ <loext:theme-colors loext:name="LibreOffice">
+ <loext:color loext:name="dark1" loext:color="#000000"/>
+ <loext:color loext:name="light1" loext:color="#ffffff"/>
+ <loext:color loext:name="dark2" loext:color="#000000"/>
+ <loext:color loext:name="light2" loext:color="#ffffff"/>
+ <loext:color loext:name="accent1" loext:color="#18a303"/>
+ <loext:color loext:name="accent2" loext:color="#0369a3"/>
+ <loext:color loext:name="accent3" loext:color="#a33e03"/>
+ <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+ <loext:color loext:name="accent5" loext:color="#c99c00"/>
+ <loext:color loext:name="accent6" loext:color="#c9211e"/>
+ <loext:color loext:name="hyperlink" loext:color="#0000ee"/>
+ <loext:color loext:name="followed-hyperlink" loext:color="#551a8b"/>
+ </loext:theme-colors>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="595.3pt" fo:page-height="841.89pt" style:num-format="1" style:print-orientation="portrait" fo:margin-top="56.69pt" fo:margin-bottom="56.69pt" fo:margin-left="56.69pt" fo:margin-right="56.69pt" style:writing-mode="lr-tb" style:footnote-max-height="0pt" loext:margin-gutter="0pt">
+ <style:footnote-sep style:width="0.51pt" style:distance-before-sep="2.86pt" style:distance-after-sep="2.86pt" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="Standard">11â—Œð¨</text:p>
+ <text:p text:style-name="Standard">11ð€ÙŽ</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
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/data/tdf112594.fodt b/sw/qa/core/text/data/tdf112594.fodt
new file mode 100644
index 000000000000..2c3157c395e1
--- /dev/null
+++ b/sw/qa/core/text/data/tdf112594.fodt
@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 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" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2023-07-27T19:10:14.987836034</meta:creation-date><dc:date>2023-07-27T19:26:21.769944388</dc:date><meta:editing-duration>PT1M22S</meta:editing-duration><meta:editing-cycles>3</meta:editing-cycles><meta:generator>LibreOfficeDev/24.2.0.0.alpha0$MacOSX_X86_64 LibreOffice_project/cf8f7b91f41821b79495c0388359c4cb1156ea67</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="2" meta:character-count="4" meta:non-whitespace-character-count="3"/></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaWidth" config:type="long">32373</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">18410</config:config-item>
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+ <config:config-item config:name="ViewLeft" config:type="long">8280</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">2501</config:config-item>
+ <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="long">32371</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">18408</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
+ <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ZoomFactor" config:type="short">110</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseVariableWidthNBSP" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HyphenateURLs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DropCapPunctuation" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">233235</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">428527</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Amiri" svg:font-family="Amiri"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Mongolian Baiti" svg:font-family="&apos;Mongolian Baiti&apos;" style:font-pitch="variable"/>
+ <style:font-face style:name="PingFang SC" svg:font-family="&apos;PingFang SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Songti SC" svg:font-family="&apos;Songti SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="8.5pt" draw:shadow-offset-y="8.5pt" draw:start-line-spacing-horizontal="8.02pt" draw:start-line-spacing-vertical="8.02pt" draw:end-line-spacing-horizontal="8.02pt" draw:end-line-spacing-vertical="8.02pt" style:writing-mode="lr-tb" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0pt" 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="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Songti SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Amiri" style:font-size-complex="12pt" style:language-complex="ar" style:country-complex="EG"/>
+ </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="35.46pt" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Songti SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Amiri" style:font-size-complex="12pt" style:language-complex="ar" style:country-complex="EG" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="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="11.99pt" fo:margin-bottom="6.01pt" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="PingFang SC" style:font-family-asian="&apos;PingFang SC&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Amiri" style:font-family-complex="Amiri" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0pt" fo:margin-bottom="7pt" style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Amiri" style:font-family-complex="Amiri"/>
+ </style:style>
+ <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="6.01pt" fo:margin-bottom="6.01pt" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Amiri" style:font-family-complex="Amiri" style:font-size-complex="12pt" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Amiri" style:font-family-complex="Amiri"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" loext:num-list-format="%1%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" loext:num-list-format="%2%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" loext:num-list-format="%3%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" loext:num-list-format="%4%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" loext:num-list-format="%5%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" loext:num-list-format="%6%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" loext:num-list-format="%7%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" loext:num-list-format="%8%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" loext:num-list-format="%9%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" loext:num-list-format="%10%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="14.14pt" style:num-format="1" text:number-position="left" text:increment="5"/>
+ <loext:theme loext:name="Office Theme">
+ <loext:theme-colors loext:name="LibreOffice">
+ <loext:color loext:name="dark1" loext:color="#000000"/>
+ <loext:color loext:name="light1" loext:color="#ffffff"/>
+ <loext:color loext:name="dark2" loext:color="#000000"/>
+ <loext:color loext:name="light2" loext:color="#ffffff"/>
+ <loext:color loext:name="accent1" loext:color="#18a303"/>
+ <loext:color loext:name="accent2" loext:color="#0369a3"/>
+ <loext:color loext:name="accent3" loext:color="#a33e03"/>
+ <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+ <loext:color loext:name="accent5" loext:color="#c99c00"/>
+ <loext:color loext:name="accent6" loext:color="#c9211e"/>
+ <loext:color loext:name="hyperlink" loext:color="#0000ee"/>
+ <loext:color loext:name="followed-hyperlink" loext:color="#551a8b"/>
+ </loext:theme-colors>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties style:rfc-language-tag-complex="mn-Mong-MN" style:language-complex="mn" style:script-complex="Mong" style:country-complex="MN"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties style:font-name="Mongolian Baiti" style:font-name-complex="Mongolian Baiti" style:rfc-language-tag-complex="mn-Mong-MN" style:language-complex="mn" style:script-complex="Mong" style:country-complex="MN"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="595.3pt" fo:page-height="841.89pt" style:num-format="1" style:print-orientation="portrait" fo:margin-top="56.69pt" fo:margin-bottom="56.69pt" fo:margin-left="56.69pt" fo:margin-right="56.69pt" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="20.01pt" style:layout-grid-ruby-height="10.01pt" 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="0pt" loext:margin-gutter="0pt">
+ <style:footnote-sep style:width="0.51pt" style:distance-before-sep="2.86pt" style:distance-after-sep="2.86pt" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="P2">11 ᠤ</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/core/text/data/tdf129810.odt b/sw/qa/core/text/data/tdf129810.odt
new file mode 100644
index 000000000000..b5a482b52caf
--- /dev/null
+++ b/sw/qa/core/text/data/tdf129810.odt
Binary files differ
diff --git a/sw/qa/core/text/data/tdf139863.fodt b/sw/qa/core/text/data/tdf139863.fodt
new file mode 100644
index 000000000000..f930a5dafc08
--- /dev/null
+++ b/sw/qa/core/text/data/tdf139863.fodt
@@ -0,0 +1,302 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 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" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2021-01-23T17:39:50.685073764</meta:creation-date><dc:date>2023-06-14T13:26:20.254164867</dc:date><meta:editing-duration>PT16M5S</meta:editing-duration><meta:editing-cycles>8</meta:editing-cycles><meta:generator>LibreOfficeDev/24.2.0.0.alpha0$MacOSX_X86_64 LibreOffice_project/bb582ae40e03e1729635b0f02331fe61f9cafea8</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="2" meta:word-count="3" meta:character-count="5" meta:non-whitespace-character-count="6"/></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaWidth" config:type="long">9694</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">5487</config:config-item>
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+ <config:config-item config:name="ViewLeft" config:type="long">3614</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">3286</config:config-item>
+ <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="long">9693</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">5486</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
+ <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ZoomFactor" config:type="short">334</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseVariableWidthNBSP" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HyphenateURLs" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DropCapPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">1789074</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">2307350</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Sans CJK SC" svg:font-family="&apos;Noto Sans CJK SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Serif CJK SC" svg:font-family="&apos;Noto Serif CJK SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.1181in" draw:shadow-offset-y="0.1181in" draw:start-line-spacing-horizontal="0.1114in" draw:start-line-spacing-vertical="0.1114in" draw:end-line-spacing-horizontal="0.1114in" draw:end-line-spacing-vertical="0.1114in" style:writing-mode="lr-tb" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0in" 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="en" fo:country="IN" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="0.5in" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="IN" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="no-limit" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.1665in" fo:margin-bottom="0.0835in" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Noto Sans CJK SC" style:font-family-asian="&apos;Noto Sans CJK SC&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lohit Devanagari1" style:font-family-complex="&apos;Lohit Devanagari&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0972in" style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lohit Devanagari" style:font-family-complex="&apos;Lohit Devanagari&apos;"/>
+ </style:style>
+ <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0.0835in" fo:margin-bottom="0.0835in" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Lohit Devanagari" style:font-family-complex="&apos;Lohit Devanagari&apos;" style:font-size-complex="12pt" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lohit Devanagari" style:font-family-complex="&apos;Lohit Devanagari&apos;"/>
+ </style:style>
+ <style:style style:name="Addressee" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0417in" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" loext:num-list-format="%1%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" loext:num-list-format="%2%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" loext:num-list-format="%3%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" loext:num-list-format="%4%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" loext:num-list-format="%5%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" loext:num-list-format="%6%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" loext:num-list-format="%7%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" loext:num-list-format="%8%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" loext:num-list-format="%9%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" loext:num-list-format="%10%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.1965in" style:num-format="1" text:number-position="left" text:increment="5"/>
+ <loext:theme loext:name="Office Theme">
+ <loext:theme-colors loext:name="LibreOffice">
+ <loext:color loext:name="dark1" loext:color="#000000"/>
+ <loext:color loext:name="light1" loext:color="#ffffff"/>
+ <loext:color loext:name="dark2" loext:color="#000000"/>
+ <loext:color loext:name="light2" loext:color="#ffffff"/>
+ <loext:color loext:name="accent1" loext:color="#18a303"/>
+ <loext:color loext:name="accent2" loext:color="#0369a3"/>
+ <loext:color loext:name="accent3" loext:color="#a33e03"/>
+ <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+ <loext:color loext:name="accent5" loext:color="#c99c00"/>
+ <loext:color loext:name="accent6" loext:color="#c9211e"/>
+ <loext:color loext:name="hyperlink" loext:color="#0000ee"/>
+ <loext:color loext:name="followed-hyperlink" loext:color="#551a8b"/>
+ </loext:theme-colors>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties officeooo:rsid="0021d0d3"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="8.2681in" fo:page-height="11.6929in" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.7874in" fo:margin-bottom="0.7874in" fo:margin-left="0.7874in" fo:margin-right="0.7874in" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.278in" style:layout-grid-ruby-height="0.139in" 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="0in" loext:margin-gutter="0in">
+ <style:footnote-sep style:width="0.0071in" style:distance-before-sep="0.0398in" style:distance-after-sep="0.0398in" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="Standard">𑌅॒𑌗ð‘</text:p>
+ <text:p text:style-name="Standard">నమ॑సà±à°¤à±‡</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/core/text/data/tdf153040.docx b/sw/qa/core/text/data/tdf153040.docx
new file mode 100644
index 000000000000..27dc07601ab0
--- /dev/null
+++ b/sw/qa/core/text/data/tdf153040.docx
Binary files differ
diff --git a/sw/qa/core/text/data/tdf156146.fodt b/sw/qa/core/text/data/tdf156146.fodt
new file mode 100644
index 000000000000..1587cd945e49
--- /dev/null
+++ b/sw/qa/core/text/data/tdf156146.fodt
@@ -0,0 +1,281 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2023-06-14T01:10:01.497511077</meta:creation-date><dc:date>2024-04-18T18:00:26.359273842</dc:date><meta:editing-duration>PT14M47S</meta:editing-duration><meta:editing-cycles>2</meta:editing-cycles><meta:generator>ZetaOffice/7.4.8.0.0$Linux_X86_64 LibreOffice_project/b82f1163cc2fc696cf86209d94d838d04998350f</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="1" meta:word-count="154" meta:character-count="806" meta:non-whitespace-character-count="653"/></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="WordLikeWrapForAsCharFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">910346</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">811422</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:font-face-decls>
+ <style:font-face style:name="Arial Unicode MS1" svg:font-family="'Arial Unicode MS'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="SimSun" svg:font-family="SimSun" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" loext:color-lum-mod="100%" loext:color-lum-off="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="SimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Arial Unicode MS1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="SimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Arial Unicode MS1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Numbered_20_paragraph" style:display-name="Numbered paragraph" style:family="paragraph" style:parent-style-name="Standard" style:default-outline-level="1" style:list-style-name="Numbering_20_123">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" loext:num-list-format="%1%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" loext:num-list-format="%2%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" loext:num-list-format="%3%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" loext:num-list-format="%4%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" loext:num-list-format="%5%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" loext:num-list-format="%6%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" loext:num-list-format="%7%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" loext:num-list-format="%8%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" loext:num-list-format="%9%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" loext:num-list-format="%10%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:list-style style:name="Numbering_20_123" style:display-name="Numbering 123">
+ <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" loext:num-list-format="%1%." style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" fo:text-indent="-0.7cm" fo:margin-left="1.33cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" loext:num-list-format="%2%." style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.401cm" fo:text-indent="-0.7cm" fo:margin-left="2.03cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" loext:num-list-format="%3%." style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.101cm" fo:text-indent="-0.7cm" fo:margin-left="2.731cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" loext:num-list-format="%4%." style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.801cm" fo:text-indent="-0.7cm" fo:margin-left="3.431cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" loext:num-list-format="%5%." style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.501cm" fo:text-indent="-0.7cm" fo:margin-left="4.131cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" loext:num-list-format="%6%." style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.2cm" fo:text-indent="-0.7cm" fo:margin-left="4.83cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" loext:num-list-format="%7%." style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.9cm" fo:text-indent="-0.7cm" fo:margin-left="5.53cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" loext:num-list-format="%8%." style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.6cm" fo:text-indent="-0.7cm" fo:margin-left="6.23cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" loext:num-list-format="%9%." style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.301cm" fo:text-indent="-0.7cm" fo:margin-left="6.93cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" loext:num-list-format="%10%." style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="7.001cm" fo:text-indent="-0.7cm" fo:margin-left="7.631cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ </text:list-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:list text:style-name="Numbering_20_123">
+ <text:list-item>
+ <text:h text:style-name="Numbered_20_paragraph" text:outline-level="1">He heard quiet steps behind him. That didn't bode well. Who could be following him this late at night and in this deadbeat part of town? And at this particular moment, just after he pulled off the big time and was making off with the greenbacks. Was there another crook who'd had the same idea, and was now watching him and waiting for a chance to grab the fruit of his labor? Or did the steps behind him mean that one of many law officers in town was on to him and just waiting to pounce and snap those cuffs on his wrists? He nervously looked all around. Suddenly he saw the alley. Like lightning he darted off to the left and disappeared between the two warehouses almost falling over the trash can lying in the middle of the sidewalk. He tried to nervously tap his way along in the inky darkness and </text:h>
+ </text:list-item>
+ </text:list>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/data/tdf158505.odt b/sw/qa/core/text/data/tdf158505.odt
new file mode 100644
index 000000000000..c9a71033a2de
--- /dev/null
+++ b/sw/qa/core/text/data/tdf158505.odt
Binary files differ
diff --git a/sw/qa/core/text/data/tdf159336.odt b/sw/qa/core/text/data/tdf159336.odt
new file mode 100644
index 000000000000..4f396e4f2abb
--- /dev/null
+++ b/sw/qa/core/text/data/tdf159336.odt
Binary files differ
diff --git a/sw/qa/core/text/data/tdf41652_legacy.fodt b/sw/qa/core/text/data/tdf41652_legacy.fodt
new file mode 100644
index 000000000000..07761f24be72
--- /dev/null
+++ b/sw/qa/core/text/data/tdf41652_legacy.fodt
@@ -0,0 +1,300 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2023-03-31T21:00:03.692629322</meta:creation-date><dc:date>2023-03-31T21:03:03.389379879</dc:date><meta:editing-duration>PT3M8S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="2" meta:word-count="8" meta:character-count="448" meta:non-whitespace-character-count="442"/><meta:generator>LibreOfficeDev/7.6.0.0.alpha0$Linux_X86_64 LibreOffice_project/34216608eb7387c697a92f1d64ea5ca7d26a292f</meta:generator></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaWidth" config:type="long">26615</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">15436</config:config-item>
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+ <config:config-item config:name="ViewLeft" config:type="long">16088</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">3962</config:config-item>
+ <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="long">26614</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">15434</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
+ <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ZoomFactor" config:type="short">120</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="WordLikeWrapForAsCharFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">204352</config:config-item>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">204352</config:config-item>
+ <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HyphenateURLs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DropCapPunctuation" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Droid Sans Devanagari" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Droid Sans Devanagari1" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Droid Sans Fallback" svg:font-family="&apos;Droid Sans Fallback&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" 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"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="cs" fo:country="CZ" style:letter-kerning="true" style:font-name-asian="Droid Sans Fallback" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Droid Sans Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="cs" fo:country="CZ" style:letter-kerning="true" style:font-name-asian="Droid Sans Fallback" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Droid Sans Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Source Han Sans CN" style:font-family-asian="&apos;Source Han Sans CN&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Droid Sans Devanagari1" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Droid Sans Devanagari" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Droid Sans Devanagari" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="swiss" style:font-size-complex="12pt" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Droid Sans Devanagari" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ <loext:theme loext:name="Office">
+ <loext:color-table loext:name="LibreOffice">
+ <loext:color loext:name="dk1" loext:color="#000000"/>
+ <loext:color loext:name="lt1" loext:color="#ffffff"/>
+ <loext:color loext:name="dk2" loext:color="#000000"/>
+ <loext:color loext:name="lt2" loext:color="#ffffff"/>
+ <loext:color loext:name="accent1" loext:color="#18a303"/>
+ <loext:color loext:name="accent2" loext:color="#0369a3"/>
+ <loext:color loext:name="accent3" loext:color="#a33e03"/>
+ <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+ <loext:color loext:name="accent5" loext:color="#c99c00"/>
+ <loext:color loext:name="accent6" loext:color="#c9211e"/>
+ <loext:color loext:name="hlink" loext:color="#0000ee"/>
+ <loext:color loext:name="folHlink" loext:color="#551a8b"/>
+ </loext:color-table>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="00031e40" officeooo:paragraph-rsid="00031e40"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="justify" style:justify-single-word="false"/>
+ <style:text-properties officeooo:rsid="00031e40" officeooo:paragraph-rsid="00031e40"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" 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>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="P1">Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</text:p>
+ <text:p text:style-name="P2">Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/core/text/data/tdf41652_variableNBSPdisabled.fodt b/sw/qa/core/text/data/tdf41652_variableNBSPdisabled.fodt
new file mode 100644
index 000000000000..ced23ccf63ea
--- /dev/null
+++ b/sw/qa/core/text/data/tdf41652_variableNBSPdisabled.fodt
@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2023-03-31T21:00:03.692629322</meta:creation-date><dc:date>2023-03-31T21:03:03.389379879</dc:date><meta:editing-duration>PT3M8S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="2" meta:word-count="8" meta:character-count="448" meta:non-whitespace-character-count="442"/><meta:generator>LibreOfficeDev/7.6.0.0.alpha0$Linux_X86_64 LibreOffice_project/34216608eb7387c697a92f1d64ea5ca7d26a292f</meta:generator></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaWidth" config:type="long">26615</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">15436</config:config-item>
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+ <config:config-item config:name="ViewLeft" config:type="long">18978</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">4935</config:config-item>
+ <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="long">26614</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">15434</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
+ <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ZoomFactor" config:type="short">120</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="WordLikeWrapForAsCharFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseVariableWidthNBSP" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">204352</config:config-item>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">204352</config:config-item>
+ <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HyphenateURLs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DropCapPunctuation" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Droid Sans Devanagari" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Droid Sans Devanagari1" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Droid Sans Fallback" svg:font-family="&apos;Droid Sans Fallback&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" 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"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="cs" fo:country="CZ" style:letter-kerning="true" style:font-name-asian="Droid Sans Fallback" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Droid Sans Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="cs" fo:country="CZ" style:letter-kerning="true" style:font-name-asian="Droid Sans Fallback" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Droid Sans Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Source Han Sans CN" style:font-family-asian="&apos;Source Han Sans CN&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Droid Sans Devanagari1" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Droid Sans Devanagari" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Droid Sans Devanagari" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="swiss" style:font-size-complex="12pt" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Droid Sans Devanagari" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ <loext:theme loext:name="Office">
+ <loext:color-table loext:name="LibreOffice">
+ <loext:color loext:name="dk1" loext:color="#000000"/>
+ <loext:color loext:name="lt1" loext:color="#ffffff"/>
+ <loext:color loext:name="dk2" loext:color="#000000"/>
+ <loext:color loext:name="lt2" loext:color="#ffffff"/>
+ <loext:color loext:name="accent1" loext:color="#18a303"/>
+ <loext:color loext:name="accent2" loext:color="#0369a3"/>
+ <loext:color loext:name="accent3" loext:color="#a33e03"/>
+ <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+ <loext:color loext:name="accent5" loext:color="#c99c00"/>
+ <loext:color loext:name="accent6" loext:color="#c9211e"/>
+ <loext:color loext:name="hlink" loext:color="#0000ee"/>
+ <loext:color loext:name="folHlink" loext:color="#551a8b"/>
+ </loext:color-table>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="00031e40" officeooo:paragraph-rsid="00031e40"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="justify" style:justify-single-word="false"/>
+ <style:text-properties officeooo:rsid="00031e40" officeooo:paragraph-rsid="00031e40"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" 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>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="P1">Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</text:p>
+ <text:p text:style-name="P2">Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/core/text/data/tdf41652_variableNBSPenabled.fodt b/sw/qa/core/text/data/tdf41652_variableNBSPenabled.fodt
new file mode 100644
index 000000000000..60432ade34f2
--- /dev/null
+++ b/sw/qa/core/text/data/tdf41652_variableNBSPenabled.fodt
@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2023-03-31T21:00:03.692629322</meta:creation-date><dc:date>2023-03-31T21:04:31.905519901</dc:date><meta:editing-duration>PT4M36S</meta:editing-duration><meta:editing-cycles>2</meta:editing-cycles><meta:generator>LibreOfficeDev/7.6.0.0.alpha0$Linux_X86_64 LibreOffice_project/34216608eb7387c697a92f1d64ea5ca7d26a292f</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="2" meta:word-count="8" meta:character-count="448" meta:non-whitespace-character-count="442"/></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaWidth" config:type="long">26615</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">15436</config:config-item>
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+ <config:config-item config:name="ViewLeft" config:type="long">18907</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">3962</config:config-item>
+ <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="long">26614</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">15434</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
+ <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ZoomFactor" config:type="short">120</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="WordLikeWrapForAsCharFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseVariableWidthNBSP" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">204352</config:config-item>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">204352</config:config-item>
+ <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HyphenateURLs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DropCapPunctuation" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Droid Sans Devanagari" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Droid Sans Devanagari1" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Droid Sans Fallback" svg:font-family="&apos;Droid Sans Fallback&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" 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"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="cs" fo:country="CZ" style:letter-kerning="true" style:font-name-asian="Droid Sans Fallback" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Droid Sans Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="cs" fo:country="CZ" style:letter-kerning="true" style:font-name-asian="Droid Sans Fallback" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Droid Sans Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Source Han Sans CN" style:font-family-asian="&apos;Source Han Sans CN&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Droid Sans Devanagari1" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Droid Sans Devanagari" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Droid Sans Devanagari" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="swiss" style:font-size-complex="12pt" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Droid Sans Devanagari" style:font-family-complex="&apos;Droid Sans Devanagari&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ <loext:theme loext:name="Office">
+ <loext:color-table loext:name="LibreOffice">
+ <loext:color loext:name="dk1" loext:color="#000000"/>
+ <loext:color loext:name="lt1" loext:color="#ffffff"/>
+ <loext:color loext:name="dk2" loext:color="#000000"/>
+ <loext:color loext:name="lt2" loext:color="#ffffff"/>
+ <loext:color loext:name="accent1" loext:color="#18a303"/>
+ <loext:color loext:name="accent2" loext:color="#0369a3"/>
+ <loext:color loext:name="accent3" loext:color="#a33e03"/>
+ <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+ <loext:color loext:name="accent5" loext:color="#c99c00"/>
+ <loext:color loext:name="accent6" loext:color="#c9211e"/>
+ <loext:color loext:name="hlink" loext:color="#0000ee"/>
+ <loext:color loext:name="folHlink" loext:color="#551a8b"/>
+ </loext:color-table>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="00031e40" officeooo:paragraph-rsid="00031e40"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="justify" style:justify-single-word="false"/>
+ <style:text-properties officeooo:rsid="00031e40" officeooo:paragraph-rsid="00031e40"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" 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>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="P1">Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</text:p>
+ <text:p text:style-name="P2">Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/core/text/data/tdf43100_tdf120715_cursorOnSpacesOverMargin.docx b/sw/qa/core/text/data/tdf43100_tdf120715_cursorOnSpacesOverMargin.docx
new file mode 100644
index 000000000000..474d805d893e
--- /dev/null
+++ b/sw/qa/core/text/data/tdf43100_tdf120715_cursorOnSpacesOverMargin.docx
Binary files differ
diff --git a/sw/qa/core/text/data/tdf89288.fodt b/sw/qa/core/text/data/tdf89288.fodt
new file mode 100644
index 000000000000..05f702738b76
--- /dev/null
+++ b/sw/qa/core/text/data/tdf89288.fodt
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 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" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2023-06-14T11:31:39.179780521</meta:creation-date><dc:date>2023-06-14T12:06:47.703038749</dc:date><meta:editing-duration>PT5M47S</meta:editing-duration><meta:editing-cycles>8</meta:editing-cycles><meta:generator>LibreOfficeDev/24.2.0.0.alpha0$MacOSX_X86_64 LibreOffice_project/ee76ed70e97448082f4c00c5c4207a44e1a91617</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="4" meta:word-count="14" meta:character-count="26" meta:non-whitespace-character-count="26"/></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="long">1323</config:config-item>
+ <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaWidth" config:type="long">8915</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">4406</config:config-item>
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+ <config:config-item config:name="ViewLeft" config:type="long">2501</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">2501</config:config-item>
+ <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleTop" config:type="long">1323</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="long">8913</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">5727</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
+ <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ZoomFactor" config:type="short">416</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseVariableWidthNBSP" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DisableOffPagePositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HyphenateURLs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DropCapPunctuation" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="TabOverSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">1807769</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">2146757</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Sans Lao" svg:font-family="&apos;Noto Sans Lao&apos;" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="PingFang SC" svg:font-family="&apos;PingFang SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Songti SC" svg:font-family="&apos;Songti SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.1181in" draw:shadow-offset-y="0.1181in" draw:start-line-spacing-horizontal="0.1114in" draw:start-line-spacing-vertical="0.1114in" draw:end-line-spacing-horizontal="0.1114in" draw:end-line-spacing-vertical="0.1114in" style:writing-mode="lr-tb" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0in" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Songti SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Tahoma1" style:font-size-complex="12pt" style:language-complex="ar" style:country-complex="EG"/>
+ </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="0.4925in" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Songti SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Tahoma1" style:font-size-complex="12pt" style:language-complex="ar" style:country-complex="EG" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:text-properties style:font-name-complex="Noto Sans Lao" style:font-family-complex="&apos;Noto Sans Lao&apos;" style:font-style-name-complex="Regular" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:language-complex="lo" style:country-complex="LA"/>
+ </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.1665in" fo:margin-bottom="0.0835in" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="PingFang SC" style:font-family-asian="&apos;PingFang SC&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0972in" style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0.0835in" fo:margin-bottom="0.0835in" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma" style:font-family-generic-complex="swiss" style:font-size-complex="12pt" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" loext:num-list-format="%1%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" loext:num-list-format="%2%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" loext:num-list-format="%3%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" loext:num-list-format="%4%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" loext:num-list-format="%5%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" loext:num-list-format="%6%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" loext:num-list-format="%7%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" loext:num-list-format="%8%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" loext:num-list-format="%9%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" loext:num-list-format="%10%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.1965in" style:num-format="1" text:number-position="left" text:increment="5"/>
+ <loext:theme loext:name="Office Theme">
+ <loext:theme-colors loext:name="LibreOffice">
+ <loext:color loext:name="dark1" loext:color="#000000"/>
+ <loext:color loext:name="light1" loext:color="#ffffff"/>
+ <loext:color loext:name="dark2" loext:color="#000000"/>
+ <loext:color loext:name="light2" loext:color="#ffffff"/>
+ <loext:color loext:name="accent1" loext:color="#18a303"/>
+ <loext:color loext:name="accent2" loext:color="#0369a3"/>
+ <loext:color loext:name="accent3" loext:color="#a33e03"/>
+ <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+ <loext:color loext:name="accent5" loext:color="#c99c00"/>
+ <loext:color loext:name="accent6" loext:color="#c9211e"/>
+ <loext:color loext:name="hyperlink" loext:color="#0000ee"/>
+ <loext:color loext:name="followed-hyperlink" loext:color="#551a8b"/>
+ </loext:theme-colors>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:paragraph-rsid="001e6693"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties officeooo:rsid="001e6693"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="8.5in" fo:page-height="11in" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.7874in" fo:margin-bottom="0.7874in" fo:margin-left="0.7874in" fo:margin-right="0.7874in" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.278in" style:layout-grid-ruby-height="0.139in" 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="0in" loext:margin-gutter="0in">
+ <style:footnote-sep style:width="0.0071in" style:distance-before-sep="0.0398in" style:distance-after-sep="0.0398in" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="Standard">1ພາສາລາວ1</text:p>
+ <text:p text:style-name="Standard">bພາສາລາວb</text:p>
+ <text:p text:style-name="Standard">1汉语1</text:p>
+ <text:p text:style-name="Standard">b汉语b</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/core/text/frmform.cxx b/sw/qa/core/text/frmform.cxx
new file mode 100644
index 000000000000..3d43bde6aa9c
--- /dev/null
+++ b/sw/qa/core/text/frmform.cxx
@@ -0,0 +1,154 @@
+/* -*- 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 <memory>
+
+#include <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+#include <sortedobjs.hxx>
+#include <anchoredobject.hxx>
+#include <pagefrm.hxx>
+#include <txtfrm.hxx>
+#include <docsh.hxx>
+#include <wrtsh.hxx>
+
+namespace
+{
+/// Covers sw/source/core/text/frmform.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/text/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableNegativeVertOffset)
+{
+ // Given a document with 2 paragraphs, floating table is between the two (so anchored to the
+ // 2nd) and with a negative vertical offset:
+ createSwDoc("floattable-negative-vert-offset.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the negative vertical offset shifts both paragraphs down:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage);
+ CPPUNIT_ASSERT(pPage->GetSortedObjs());
+ const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ SwAnchoredObject* pPageObj = rPageObjs[0];
+ const SwRect& rFlyRect = pPageObj->GetObjRectWithSpaces();
+ SwFrame* pBody = pPage->FindBodyCont();
+ SwFrame* pPara1 = pBody->GetLower();
+ SwFrame* pPara2 = pPara1->GetNext();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected less than: 993
+ // - Actual : 2709
+ // i.e. the expectation that the fly doesn't overlap with the 2nd paragraph was not true.
+ // Instead we got a layout loop, aborted by the loop control, and the fly overlapped with the
+ // 2nd paragraph.
+ CPPUNIT_ASSERT_LESS(pPara2->getFrameArea().Top(), rFlyRect.Bottom());
+}
+
+// FIXME: because breaking the lines at the right place, test document became obsolete
+#if 0
+CPPUNIT_TEST_FIXTURE(Test, testFloattableAvoidManipOfst)
+{
+ // Given a document with a 6-page floating table and some anchor text:
+ createSwDoc("floattable-avoid-manip-ofst.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure all anchor text is on the last page:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ SwPageFrame* pLastPage = pLayout->GetLastPage();
+ SwLayoutFrame* pBodyFrame = pLastPage->FindBodyCont();
+ SwTextFrame* pAnchor = pBodyFrame->GetLower()->DynCastTextFrame();
+ // If this is not 0, that means some of the anchor text is shifted to a previous page, while
+ // anchors of non-last split fly frames should contain no text.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), pAnchor->GetOffset().get());
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableAvoidLastManipOfst)
+{
+ // Given a document with a 5-page floating table and some anchor text:
+ createSwDoc("floattable-avoid-last-manip-ofst.docx");
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->Insert2("dt");
+
+ // When expanding dummy text on the last page:
+ dispatchCommand(mxComponent, ".uno:ExpandGlossary", {});
+
+ // Then make sure the expanded text starts on page 5:
+ SwDoc* pDoc = getSwDocShell()->GetDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage1->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ auto pPage3 = dynamic_cast<SwPageFrame*>(pPage2->GetNext());
+ CPPUNIT_ASSERT(pPage3);
+ auto pPage4 = dynamic_cast<SwPageFrame*>(pPage3->GetNext());
+ CPPUNIT_ASSERT(pPage4);
+ auto pPage5 = dynamic_cast<SwPageFrame*>(pPage4->GetNext());
+ CPPUNIT_ASSERT(pPage5);
+ SwContentFrame* pAnchor = pPage5->FindFirstBodyContent();
+ SwTextFrame* pAnchorText = pAnchor->DynCastTextFrame();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 1123
+ // i.e. the expand result went to page 4 and page 5 (page 5's content had no zero offset),
+ // instead of starting on page 5 (and creating a 6th page).
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
+ static_cast<sal_Int32>(pAnchorText->GetOffset()));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableBadFlyPos)
+{
+ // Given a document with an inner floating table on page 2 -> 4:
+ // When laying out that document:
+ createSwDoc("floattable-bad-fly-pos.docx");
+
+ // Then make sure that pages 2 -> 4 get the 3 fly frames:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(!pPage1->GetSortedObjs());
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pPage2->GetSortedObjs()->size());
+ auto pPage3 = pPage2->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage3);
+ CPPUNIT_ASSERT(pPage3->GetSortedObjs());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. the fly on page 4 was still on page 3.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pPage3->GetSortedObjs()->size());
+ auto pPage4 = pPage3->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage4);
+ CPPUNIT_ASSERT(pPage4->GetSortedObjs());
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pPage4->GetSortedObjs()->size());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/text/itratr.cxx b/sw/qa/core/text/itratr.cxx
new file mode 100644
index 000000000000..6913d0037dbd
--- /dev/null
+++ b/sw/qa/core/text/itratr.cxx
@@ -0,0 +1,58 @@
+/* -*- 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 <memory>
+
+#include <IDocumentLayoutAccess.hxx>
+#include <doc.hxx>
+#include <frame.hxx>
+#include <pagefrm.hxx>
+#include <rootfrm.hxx>
+#include <sortedobjs.hxx>
+
+namespace
+{
+/// Covers sw/source/core/text/itratr.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/text/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableNegativeVertOffsetEmptyAnchor)
+{
+ // Given a document with 3 floating tables, all of them on page 1, but the anchor of the last
+ // floating table is on page 2, but that anchor has no own text:
+ createSwDoc("floattable-negative-vert-offset-empty.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure the that 3rd floating table is not shifted to page 2:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 3
+ // - Actual : 2
+ // i.e. the last floating table was shifted to page 2, which lead to overlapping text in the
+ // original document.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), rPage1Objs.size());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/text/itrform2.cxx b/sw/qa/core/text/itrform2.cxx
new file mode 100644
index 000000000000..860b2197f761
--- /dev/null
+++ b/sw/qa/core/text/itrform2.cxx
@@ -0,0 +1,229 @@
+/* -*- 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 <memory>
+
+#include <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+#include <sortedobjs.hxx>
+#include <pagefrm.hxx>
+#include <cntfrm.hxx>
+#include <docsh.hxx>
+#include <wrtsh.hxx>
+#include <formatcontentcontrol.hxx>
+#include <textcontentcontrol.hxx>
+
+namespace
+{
+/// Covers sw/source/core/text/itrform2.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/text/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableWrapEmptyParagraph)
+{
+ // Given a document with 2 pages, a floating table on both pages:
+ createSwDoc("floattable-wrap-empty-para.docx");
+
+ // When calculating the layout:
+ calcLayout();
+
+ // Then make sure that each page has exactly 1 floating table:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage);
+ CPPUNIT_ASSERT(pPage->GetSortedObjs());
+ const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. both tables were on page 1, leading to an overlap.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ const SwSortedObjs& rPageObjs2 = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs2.size());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableLegacyWrapEmptyParagraph)
+{
+ // Given a document with 2 pages, a floating table on both pages (from DOC, so the table is
+ // shifted towards the left page edge slightly):
+ createSwDoc("floattable-wrap-empty-para-legacy.docx");
+
+ // When calculating the layout:
+ calcLayout();
+
+ // Then make sure that each page has exactly 1 floating table:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage);
+ CPPUNIT_ASSERT(pPage->GetSortedObjs());
+ const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. both tables were on page 1, leading to an overlap.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs.size());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ const SwSortedObjs& rPageObjs2 = *pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rPageObjs2.size());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testApplyTextAttrToEmptyLineAtEndOfParagraph)
+{
+ createSwDoc("A011-charheight.rtf");
+
+ calcLayout();
+
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+
+ SwContentFrame* pLastPara = pPage->FindLastBodyContent();
+ // wrong was 449 (11.5pt)
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(368), pLastPara->getFrameArea().Height());
+ SwContentFrame* pFirstPara = pPage->FindFirstBodyContent();
+ // wrong was 817 (11.5pt)
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(736), pFirstPara->getFrameArea().Height());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFlyMinimalWrap)
+{
+ // Given a document with a first page that has a shape and a table in it (not floating table),
+ // some empty paragraphs wrapping around the shape:
+ createSwDoc("fly-minimal-wrap.docx");
+
+ // When calculating the layout:
+ calcLayout();
+
+ // Then make sure the wrap happens, so the 2nd page only has 2 paragraphs:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage);
+ CPPUNIT_ASSERT(pPage->GetSortedObjs());
+ const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rPageObjs.size());
+ auto pPage2 = dynamic_cast<SwPageFrame*>(pPage->GetNext());
+ CPPUNIT_ASSERT(pPage2);
+ CPPUNIT_ASSERT(!pPage2->GetSortedObjs());
+ SwLayoutFrame* pBody2 = pPage2->FindBodyCont();
+ SwFrame* pPage2Para1 = pBody2->GetLower();
+ CPPUNIT_ASSERT(pPage2Para1);
+ SwFrame* pPage2Para2 = pPage2Para1->GetNext();
+ CPPUNIT_ASSERT(pPage2Para2);
+ // Without the accompanying fix in place, this test would have failed, the second page had 19
+ // text frames in the body frame, not 2.
+ CPPUNIT_ASSERT(!pPage2Para2->GetNext());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testContentControlHeaderPDFExport)
+{
+ // Given a document with a content control in the header:
+ createSwDoc("content-control-header.docx");
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure all the expected text is there on page 2:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ if (!pPdfDocument)
+ {
+ return;
+ }
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage2 = pPdfDocument->openPage(1);
+ int nTextCount = 0;
+ for (int i = 0; i < pPage2->getObjectCount(); ++i)
+ {
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pObject = pPage2->getObject(i);
+ if (pObject->getType() == vcl::pdf::PDFPageObjectType::Text)
+ {
+ ++nTextCount;
+ }
+ }
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 3
+ // - Actual : 2
+ // i.e. not all of header, heading and body text was there on page 2, content was lost.
+ CPPUNIT_ASSERT_EQUAL(3, nTextCount);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSplitFlyAnchorLeftMargin)
+{
+ // Given a document with a floating table, anchor para is followed by another para with a left
+ // margin:
+ createSwDoc("floattable-anchor-left-margin.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that the left margin of this last paragraph is not lost:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage);
+ SwContentFrame* pLastPara = pPage->FindLastBodyContent();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 6480
+ // - Actual : 0
+ // i.e. the left margin was lost.
+ CPPUNIT_ASSERT_EQUAL(static_cast<SwTwips>(6480), pLastPara->getFramePrintArea().Left());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testCheckedCheckboxContentControlPDF)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given a file with a checked checkbox content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::CHECKBOX);
+ // Toggle it, so we get a checked one:
+ SwTextContentControl* pTextContentControl = pWrtShell->CursorInsideContentControl();
+ const SwFormatContentControl& rFormatContentControl = pTextContentControl->GetContentControl();
+ pWrtShell->GotoContentControl(rFormatContentControl);
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure that a checked checkbox form widget is emitted:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+ std::unique_ptr<vcl::pdf::PDFiumAnnotation> pAnnotation = pPage->getAnnotation(0);
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Widget, pAnnotation->getSubType());
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFFormFieldType::CheckBox,
+ pAnnotation->getFormFieldType(pPdfDocument.get()));
+ OUString aActual = pAnnotation->getFormFieldValue(pPdfDocument.get());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: Yes
+ // - Actual : Off
+ // i.e. the /AP -> /N key of the checkbox widget annotation object didn't have a sub-key that
+ // would match /V, leading to not showing the checked state.
+ CPPUNIT_ASSERT_EQUAL(OUString("Yes"), aActual);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/text/porlay.cxx b/sw/qa/core/text/porlay.cxx
new file mode 100644
index 000000000000..a2e94c586515
--- /dev/null
+++ b/sw/qa/core/text/porlay.cxx
@@ -0,0 +1,60 @@
+/* -*- 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 <memory>
+
+#include <IDocumentLayoutAccess.hxx>
+#include <doc.hxx>
+#include <frame.hxx>
+#include <pagefrm.hxx>
+#include <rootfrm.hxx>
+#include <txtfrm.hxx>
+
+namespace
+{
+/// Covers sw/source/core/text/porlay.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/text/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testEmptySuperscript)
+{
+ // Given a document with 4 paragraphs, the 2nd is empty and is marked as superscript:
+ createSwDoc("empty-superscript.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure all 4 text frames have visible heights:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = pLayout->GetLower()->DynCastPageFrame();
+ auto pText1 = pPage->FindFirstBodyContent()->DynCastTextFrame();
+ CPPUNIT_ASSERT_GREATER(static_cast<SwTwips>(0), pText1->getFrameArea().Height());
+ auto pText2 = pText1->GetNext()->DynCastTextFrame();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 0
+ // - Actual : 0
+ // i.e. the 2nd paragraph was not visible.
+ CPPUNIT_ASSERT_GREATER(static_cast<SwTwips>(0), pText2->getFrameArea().Height());
+ auto pText3 = pText2->GetNext()->DynCastTextFrame();
+ CPPUNIT_ASSERT_GREATER(static_cast<SwTwips>(0), pText3->getFrameArea().Height());
+ auto pText4 = pText3->GetNext()->DynCastTextFrame();
+ CPPUNIT_ASSERT_GREATER(static_cast<SwTwips>(0), pText4->getFrameArea().Height());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/text/porrst.cxx b/sw/qa/core/text/porrst.cxx
new file mode 100644
index 000000000000..f2e14e7f7f31
--- /dev/null
+++ b/sw/qa/core/text/porrst.cxx
@@ -0,0 +1,94 @@
+/* -*- 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 <memory>
+
+#include <IDocumentLayoutAccess.hxx>
+#include <doc.hxx>
+#include <frame.hxx>
+#include <layfrm.hxx>
+#include <pagefrm.hxx>
+#include <rootfrm.hxx>
+#include <txtfrm.hxx>
+#include <sortedobjs.hxx>
+
+namespace
+{
+/// Covers sw/source/core/text/porrst.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/text/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableLeftoverParaPortion)
+{
+ // Given a document with a multi-page floating table, the anchor of the table has some text:
+ createSwDoc("floattable-leftover-para-portion.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure all anchor text goes to the second page:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage);
+ SwFrame* pBody = pPage->FindBodyCont();
+ SwFrame* pPara1 = pBody->GetLower();
+ auto pPara2 = pPara1->GetNext()->DynCastTextFrame();
+ CPPUNIT_ASSERT(pPara2);
+ // Without the accompanying fix in place, this test would have failed, the first page's anchor
+ // also had some (duplicated) anchor text.
+ CPPUNIT_ASSERT(!pPara2->GetPara());
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableAnchorHeight)
+{
+#if !defined(MACOSX) // FIXME fails on macOS
+ // Given 3 tables, innermost table on pages 2-3-4:
+ createSwDoc("floattable-anchor-height.docx");
+
+ // When laying out the document:
+ calcLayout();
+
+ // Then make sure the flys are on the expected pages:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(!pPage1->GetSortedObjs());
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ SwSortedObjs* pPage2Objs = pPage2->GetSortedObjs();
+ CPPUNIT_ASSERT(pPage2Objs);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pPage2Objs->size());
+ auto pPage3 = pPage2->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage3);
+ SwSortedObjs* pPage3Objs = pPage3->GetSortedObjs();
+ CPPUNIT_ASSERT(pPage3Objs);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. page 3 also had the fly frame of page 4 as well.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pPage3Objs->size());
+ auto pPage4 = pPage3->GetNext()->DynCastPageFrame();
+ SwSortedObjs* pPage4Objs = pPage4->GetSortedObjs();
+ CPPUNIT_ASSERT(pPage4Objs);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pPage4Objs->size());
+#endif
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 8b4c6ae336bb..b1d89c5260ef 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -9,22 +9,60 @@
#include <swmodeltestbase.hxx>
+#include <memory>
+
+#include <com/sun/star/text/BibliographyDataField.hpp>
+#include <com/sun/star/text/BibliographyDataType.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+
#include <vcl/gdimtf.hxx>
+#include <vcl/metaact.hxx>
+#include <vcl/filter/PDFiumLibrary.hxx>
+#include <vcl/filter/pdfdocument.hxx>
+#include <comphelper/propertyvalue.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/wghtitem.hxx>
#include <docsh.hxx>
#include <unotxdoc.hxx>
#include <wrtsh.hxx>
-
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/text/data/";
+#include <IDocumentLayoutAccess.hxx>
+#include <rootfrm.hxx>
+#include <txtfrm.hxx>
+#include <porlay.hxx>
+#include <pormulti.hxx>
+#include <formatlinebreak.hxx>
+#include <sortedobjs.hxx>
+#include <anchoredobject.hxx>
+#include <fmtcntnt.hxx>
+#include <fmtfsize.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <formatcontentcontrol.hxx>
+#include <strings.hrc>
+#include <ndtxt.hxx>
+#include <txatbase.hxx>
+#include <textcontentcontrol.hxx>
+#include <pagefrm.hxx>
+#include <inftxt.hxx>
+#include <itrtxt.hxx>
/// Covers sw/source/core/text/ fixes.
class SwCoreTextTest : public SwModelTestBase
{
+public:
+ SwCoreTextTest()
+ : SwModelTestBase("/sw/qa/core/text/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testFootnoteConnect)
{
- SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "footnote-connect.fodt");
+ createSwDoc("footnote-connect.fodt");
+ SwDoc* pDoc = getSwDoc();
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
// Jump to the start of the next page.
pWrtShell->SttNxtPg();
@@ -43,13 +81,13 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testFootnoteConnect)
CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testSemiTransparentText)
{
// Create an in-memory empty document.
- loadURL("private:factory/swriter", nullptr);
+ createSwDoc();
// Set text to half-transparent and type a character.
uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(xParagraph.is());
sal_Int16 nTransparence = 50;
- xParagraph->setPropertyValue("CharTransparence", uno::makeAny(nTransparence));
+ xParagraph->setPropertyValue("CharTransparence", uno::Any(nTransparence));
uno::Reference<text::XTextRange> xTextRange(xParagraph, uno::UNO_QUERY);
CPPUNIT_ASSERT(xTextRange.is());
xTextRange->setString("x");
@@ -66,7 +104,1558 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testSemiTransparentText)
MetafileXmlDump dumper;
xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
CPPUNIT_ASSERT(pXmlDoc);
- assertXPath(pXmlDoc, "//floattransparent");
+ assertXPath(pXmlDoc, "//floattransparent"_ostr);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testLastBibliographyPdfExport)
+{
+ // Given a document with a bibliography as the last paragraph:
+ createSwDoc("tdf158505.odt");
+
+ // It should be possible to export to PDF:
+ save("writer_pdf_Export");
+
+ // Without the accompanying fix, the export to PDF would get stuck in an infinite loop
+ CPPUNIT_ASSERT(true);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf156146)
+{
+ createSwDoc("tdf156146.fodt");
+
+ uno::Reference<container::XIndexAccess> const xLevels1(
+ getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules"));
+ ::comphelper::SequenceAsHashMap props1(xLevels1->getByIndex(0));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-700), props1["FirstLineIndent"].get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1330), props1["IndentAt"].get<sal_Int32>());
+
+ // common style applies list-style-name and margin-left
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ getProperty<sal_Int32>(getParagraph(1), "ParaFirstLineIndent"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(1), "ParaRightMargin"));
+
+ SwTextFrame* const pFrame(dynamic_cast<SwTextFrame*>(
+ static_cast<SwPageFrame*>(getSwDoc()->GetDocShell()->GetWrtShell()->GetLayout()->GetLower())
+ ->FindFirstBodyContent()));
+ CPPUNIT_ASSERT(pFrame);
+ // this appears to be the only way to get the actual computed margins
+ SwTextSizeInfo info(pFrame);
+ SwTextMargin tm(pFrame, &info);
+ // this was wrong, 357
+ CPPUNIT_ASSERT_EQUAL(SwTwips(0), tm.FirstLeft() - pFrame->getFrameArea().Left());
+ // this was wrong, 754
+ CPPUNIT_ASSERT_EQUAL(SwTwips(0), tm.Left() - pFrame->getFrameArea().Left());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf159903)
+{
+ createSwDoc("Broken indent demo.odt");
+
+ uno::Reference<container::XIndexAccess> const xLevels1(
+ getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules"));
+ ::comphelper::SequenceAsHashMap props1(xLevels1->getByIndex(0));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-4001), props1["FirstLineIndent"].get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4001), props1["IndentAt"].get<sal_Int32>());
+
+ // common style applies list-style-name, parent style margin-left
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ getProperty<sal_Int32>(getParagraph(1), "ParaFirstLineIndent"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(1), "ParaRightMargin"));
+
+ SwTextFrame* const pFrame(dynamic_cast<SwTextFrame*>(
+ static_cast<SwPageFrame*>(getSwDoc()->GetDocShell()->GetWrtShell()->GetLayout()->GetLower())
+ ->FindFirstBodyContent()));
+ CPPUNIT_ASSERT(pFrame);
+ // this appears to be the only way to get the actual computed margins
+ SwTextSizeInfo info(pFrame);
+ SwTextMargin tm(pFrame, &info);
+ CPPUNIT_ASSERT_EQUAL(SwTwips(0), tm.FirstLeft() - pFrame->getFrameArea().Left());
+ // left was wrong, was same as first
+ CPPUNIT_ASSERT_EQUAL(SwTwips(2268), tm.Left() - pFrame->getFrameArea().Left());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf159336)
+{
+ createSwDoc("tdf159336.odt");
+ save("writer_pdf_Export");
+
+ vcl::filter::PDFDocument aDocument;
+ SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
+ CPPUNIT_ASSERT(aDocument.Read(aStream));
+
+ // The document has one page.
+ std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aPages.size());
+
+ auto pAnnots = dynamic_cast<vcl::filter::PDFArrayElement*>(aPages[0]->Lookup("Annots"_ostr));
+ CPPUNIT_ASSERT(pAnnots);
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pAnnots->GetElements().size());
+ auto pAnnotReference
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pAnnots->GetElements()[0]);
+ CPPUNIT_ASSERT(pAnnotReference);
+ vcl::filter::PDFObjectElement* pAnnot = pAnnotReference->LookupObject();
+ CPPUNIT_ASSERT(pAnnot);
+ CPPUNIT_ASSERT_EQUAL(
+ "Annot"_ostr,
+ static_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"_ostr))->GetValue());
+ CPPUNIT_ASSERT_EQUAL(
+ "Widget"_ostr,
+ static_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Subtype"_ostr))->GetValue());
+ // Ff = multiline
+ auto pFf = dynamic_cast<vcl::filter::PDFNumberElement*>(pAnnot->Lookup("Ff"_ostr));
+ CPPUNIT_ASSERT(pFf);
+ CPPUNIT_ASSERT_EQUAL(4096.0, pFf->GetValue());
+}
+
+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::Any(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:
+ save("writer_pdf_Export");
+
+ // Then make sure the field links the source.
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ 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, testBibliographyUrlPdfExport2)
+{
+ // 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("#page=1")),
+ };
+ xField->setPropertyValue("Fields", uno::Any(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:
+ save("writer_pdf_Export");
+
+ // Then make sure the field links when the Target URL is set
+ // (this test is important, isn't the same as the one above)
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPdfPage = pPdfDocument->openPage(/*nIndex=*/0);
+ CPPUNIT_ASSERT(pPdfPage->hasLinks());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport3)
+{
+ // 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("TargetURL", OUString("#page=1")),
+ };
+ xField->setPropertyValue("Fields", uno::Any(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:
+ save("writer_pdf_Export");
+
+ // Then make sure there are no links since UseTargetURL is not set
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPdfPage = pPdfDocument->openPage(/*nIndex=*/0);
+ CPPUNIT_ASSERT(!pPdfPage->hasLinks());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport4)
+{
+ // 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("TargetType", OUString("1")), // 1 == UseTargetURL
+ comphelper::makePropertyValue("TargetURL", OUString("#page=1")),
+ };
+ xField->setPropertyValue("Fields", uno::Any(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:
+ save("writer_pdf_Export");
+
+ // Then make sure the field links when the Target URL is set
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPdfPage = pPdfDocument->openPage(/*nIndex=*/0);
+ CPPUNIT_ASSERT(pPdfPage->hasLinks());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport5)
+{
+ // 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("TargetType", OUString("3")), // 3 == BibliographyTableRow
+ };
+ xField->setPropertyValue("Fields", uno::Any(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 the table
+ uno::Reference<text::XDocumentIndex> xTableIndex(xTable, uno::UNO_QUERY);
+ xTableIndex->update();
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure the mark links to the table when table is present
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPdfPage = pPdfDocument->openPage(/*nIndex=*/0);
+ CPPUNIT_ASSERT(pPdfPage->hasLinks());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport6)
+{
+ // 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);
+
+ // Create a bibliography mark
+ 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("AuthorName")),
+ comphelper::makePropertyValue("Title", OUString("Title")),
+ comphelper::makePropertyValue("TargetType", OUString("3")), // 3 == BibliographyTableRow
+ };
+ xField->setPropertyValue("Fields", uno::Any(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);
+
+ // Set formatting for AUTH_TYPE_WWW to include tab stop
+ uno::Reference<beans::XPropertySet> xTableAsPropertySet(xTable, uno::UNO_QUERY_THROW);
+ uno::Reference<container::XIndexReplace> aAllPatterns(
+ xTableAsPropertySet->getPropertyValue("LevelFormat"), uno::UNO_QUERY);
+
+ uno::Sequence<uno::Sequence<beans::PropertyValue>> aFormattingPattern
+ = { {
+ comphelper::makePropertyValue("TokenType", OUString("TokenBibliographyDataField")),
+ comphelper::makePropertyValue("BibliographyDataField",
+ text::BibliographyDataField::AUTHOR),
+ comphelper::makePropertyValue("CharacterStyleName", OUString("")),
+ },
+ {
+ comphelper::makePropertyValue("TokenType", OUString("TokenTabStop")),
+ comphelper::makePropertyValue("TabStopRightAligned", true),
+ comphelper::makePropertyValue("CharacterStyleName", OUString("")),
+ },
+ {
+ comphelper::makePropertyValue("TokenType", OUString("TokenBibliographyDataField")),
+ comphelper::makePropertyValue("BibliographyDataField",
+ text::BibliographyDataField::TITLE),
+ comphelper::makePropertyValue("CharacterStyleName", OUString("")),
+ },
+ {
+ comphelper::makePropertyValue("TokenType", OUString("TokenTabStop")),
+ comphelper::makePropertyValue("TabStopRightAligned", false),
+ comphelper::makePropertyValue("TabStopFillCharacter", OUString(".")),
+ comphelper::makePropertyValue("CharacterStyleName", OUString("")),
+ },
+ {
+ comphelper::makePropertyValue("TokenType", OUString("TokenText")),
+ comphelper::makePropertyValue("Text", OUString("FixedText")),
+ comphelper::makePropertyValue("CharacterStyleName", OUString("")),
+ } };
+
+ aAllPatterns->replaceByIndex(AUTH_TYPE_WWW + 1, uno::Any(aFormattingPattern));
+ xTableAsPropertySet->setPropertyValue("LevelFormat", uno::Any(aAllPatterns));
+
+ // Update the table
+ uno::Reference<text::XDocumentIndex> xTableIndex(xTable, uno::UNO_QUERY);
+ xTableIndex->update();
+
+ // Assert the table updated correctly
+ OUString sExpectedPattern("AuthorName\tTitle\tFixedText");
+ OUString sDocumentText = xTextDocument->getText()->getString();
+ sal_Int32 iTabPos = sDocumentText.indexOf(sExpectedPattern);
+ CPPUNIT_ASSERT(iTabPos >= 0);
+ CPPUNIT_ASSERT_EQUAL(iTabPos, sDocumentText.lastIndexOf(sExpectedPattern));
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure the mark links to the table even when format contains tab stop
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPdfPage = pPdfDocument->openPage(/*nIndex=*/0);
+ CPPUNIT_ASSERT(pPdfPage->hasLinks());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTabOverMarginSection)
+{
+ createSwDoc("tabovermargin-section.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ sal_Int32 nWidth
+ = getXPath(pXmlDoc,
+ "//SwParaPortion/SwLineLayout/child::*[@type='PortionType::TabRight']"_ostr,
+ "width"_ostr)
+ .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_TEST_FIXTURE(SwCoreTextTest, testLineHeight)
+{
+ // Given a document with an as-char image, height in twips not fitting into sal_uInt16:
+ createSwDoc("line-height.fodt");
+
+ // When laying out that document:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Then make sure its top is the top of the page:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 284
+ // - Actual : -65252
+ // due to various unsigned integer truncations.
+ assertXPath(pXmlDoc, "//fly/infos/bounds"_ostr, "top"_ostr, OUString::number(DOCUMENTBORDER));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testLineWidth)
+{
+ // Given a document with an as-char image, width in twips not fitting into sal_uInt16:
+ createSwDoc("line-width.fodt");
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ sal_Int32 nOldLeft = pWrtShell->GetCharRect().Left();
+
+ // When moving the cursor to the right:
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+
+ // Then make sure we move to the right by the image width:
+ sal_Int32 nNewLeft = pWrtShell->GetCharRect().Left();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected greater than: 65536
+ // - Actual : 1872
+ // i.e. the width (around 67408 twips) was truncated.
+ CPPUNIT_ASSERT_GREATER(static_cast<sal_Int32>(65536), nNewLeft - nOldLeft);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testChineseAutoFirstLineIndent)
+{
+ // The test document contains two simple multi-line paragraph. For both paragraphs, the first line indent
+ // is set to 'auto'. Line spacing is 100% for the 1st paragraph and 200% for the 2nd paragraph.
+ // Also, there is a "AutoFirstLineIndentDisregardLineSpace" capability flag set in the document.
+ createSwDoc("firstLineIndent-withFlag.fodt");
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Get the line width of the first line for the 1st paragraph.
+ sal_Int32 nFirstLineWidth
+ = getXPath(pXmlDoc, "//body/txt[1]/SwParaPortion/SwLineLayout[1]"_ostr, "width"_ostr)
+ .toInt32();
+ // Get the line width of the first line for the 2nd paragraph.
+ sal_Int32 nSecondLineWidth
+ = getXPath(pXmlDoc, "//body/txt[2]/SwParaPortion/SwLineLayout[1]"_ostr, "width"_ostr)
+ .toInt32();
+
+ // Tdf#129448: the changing of line-height should not affect the auto first line indent.
+ // As a result, the first line width of the two paragraphs should be the same.
+ CPPUNIT_ASSERT_EQUAL(nSecondLineWidth, nFirstLineWidth);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testRuby)
+{
+ // Given a document with multiple ruby portions:
+ createSwDoc("ruby.fodt");
+ SwDoc* pDoc = getSwDoc();
+
+ // When laying out that document:
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+
+ // Then make sure that no unwanted margin portions are created, making the actual text
+ // invisible:
+ SwFrame* pPageFrame = pLayout->GetLower();
+ SwFrame* pBodyFrame = pPageFrame->GetLower();
+ SwFrame* pFrame = pBodyFrame->GetLower();
+ CPPUNIT_ASSERT(pFrame->IsTextFrame());
+ auto pTextFrame = static_cast<SwTextFrame*>(pFrame);
+ SwParaPortion* pPara = pTextFrame->GetPara();
+ bool bFirst = true;
+ for (SwLinePortion* pPor = pPara->GetFirstPortion(); pPor; pPor = pPor->GetNextPortion())
+ {
+ // Look for multi-portions in the only paragraph of the document.
+ if (pPor->GetWhichPor() != PortionType::Multi)
+ {
+ continue;
+ }
+
+ if (bFirst)
+ {
+ bFirst = false;
+ continue;
+ }
+
+ // The second multi-portion has two lines, check the start of the second line.
+ auto pMulti = static_cast<SwMultiPortion*>(pPor);
+ // Without the accompanying fix in place, this test would have failed, as the portion was a
+ // margin portion, not a text portion. The margin was so large that the actual text portion was
+ // hidden. No margin is needed here at all.
+ CPPUNIT_ASSERT(pMulti->GetRoot().GetNext()->GetFirstPortion()->IsTextPortion());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testEmptyNumberingPageSplit)
+{
+ // Given a document with 2 pages: the only para on page 1 is a numbering without a number
+ // portion:
+ createSwDoc("empty-numbering-page-split.fodt");
+
+ // When inserting an image that doesn't fit the body frame:
+ // Then make sure that the layout update after insertion finishes:
+ uno::Sequence<beans::PropertyValue> aArgs = {
+ comphelper::makePropertyValue("FileName", createFileURL(u"image.png")),
+ };
+ // Without the accompanying fix in place, this never finished.
+ dispatchCommand(mxComponent, ".uno:InsertGraphic", aArgs);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreak)
+{
+ // Given a document with a fly frame and two characters wrapped around it:
+ createSwDoc("clearing-break.fodt");
+ // Insert a clearing break between "A" and "B":
+ uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xCursor->gotoEnd(/*bSelect=*/false);
+ xCursor->goLeft(/*nCount=*/1, /*bSelect=*/false);
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xLineBreak(
+ xFactory->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
+ auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL);
+ xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear));
+ xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
+
+ // When laying out that document:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Then make sure that the second line "jumps down", below the fly frame:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1024
+ // - Actual : 276
+ // i.e. the line height wasn't the twips value of the 1.806 cm from the file, but was based on
+ // the font size of the text, which is only correct for non-clearing breaks.
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout[1]"_ostr, "height"_ostr, "1024");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakAtStart)
+{
+ // Given a document with a fly frame and a character wrapped around it:
+ createSwDoc("clearing-break-start.fodt");
+ // Insert a clearing break before "X":
+ uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xCursor->gotoEnd(/*bSelect=*/false);
+ xCursor->goLeft(/*nCount=*/1, /*bSelect=*/false);
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xLineBreak(
+ xFactory->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
+ auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL);
+ xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear));
+ xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
+
+ // When laying out that document:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Then make sure that the second line "jumps down", below the fly frame:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1024
+ // - Actual : 276
+ // i.e. the line height was too small, but only in case the full line was a fly and a break
+ // portion, without any real content.
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout[1]"_ostr, "height"_ostr, "1024");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakLeft)
+{
+ // Given a document with two anchored objects (left height is 5cm, right height is 7.5cm) and a
+ // clearing break (type=left):
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ {
+ uno::Reference<drawing::XShape> xShape(
+ xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
+ xShape->setSize(awt::Size(5000, 5000));
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ xShapeProps->setPropertyValue("AnchorType",
+ uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ uno::Reference<text::XTextContent> xShapeContent(xShape, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xShapeContent, /*bAbsorb=*/false);
+ }
+ {
+ uno::Reference<drawing::XShape> xShape(
+ xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
+ xShape->setSize(awt::Size(5000, 7500));
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ xShapeProps->setPropertyValue("AnchorType",
+ uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ xShapeProps->setPropertyValue("HoriOrientPosition", uno::Any(sal_Int32(10000)));
+ uno::Reference<text::XTextContent> xShapeContent2(xShape, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xShapeContent2, /*bAbsorb=*/false);
+ }
+ uno::Reference<text::XTextContent> xLineBreak(
+ xFactory->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
+ auto eClear = static_cast<sal_Int16>(SwLineBreakClear::LEFT);
+ xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear));
+ xText->insertString(xCursor, "foo", /*bAbsorb=*/false);
+ xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
+ xText->insertString(xCursor, "bar", /*bAbsorb=*/false);
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure the "bar" jumps down below the left shape, but not below the right shape (due
+ // to type=left):
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2837
+ // - Actual : 4254
+ // i.e. any non-none type was handled as type=all, and this was jumping below both shapes.
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout[1]"_ostr, "height"_ostr, "2837");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakLeftRTL)
+{
+ // Given a document with an anchored object in an RTL para and a clearing break (type=left):
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ uno::Reference<beans::XPropertySet> xCursorProps(xCursor, uno::UNO_QUERY);
+ xCursorProps->setPropertyValue("WritingMode", uno::Any(text::WritingMode2::RL_TB));
+ {
+ uno::Reference<drawing::XShape> xShape(
+ xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
+ xShape->setSize(awt::Size(5000, 5000));
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ xShapeProps->setPropertyValue("AnchorType",
+ uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ uno::Reference<text::XTextContent> xShapeContent(xShape, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xShapeContent, /*bAbsorb=*/false);
+ }
+ uno::Reference<text::XTextContent> xLineBreak(
+ xFactory->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
+ auto eClear = static_cast<sal_Int16>(SwLineBreakClear::RIGHT);
+ xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear));
+ xText->insertString(xCursor, "foo", /*bAbsorb=*/false);
+ xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
+ xText->insertString(xCursor, "bar", /*bAbsorb=*/false);
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure the "bar" does not jump down (due to type=left && RTL):
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 276
+ // - Actual : 2837
+ // i.e. left/right was not ignored in the RTL case.
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout[1]"_ostr, "height"_ostr, "276");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakVertical)
+{
+ // Given a document with an anchored object in a vertical page and a clearing break (type=all):
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ uno::Reference<beans::XPropertySet> xStandard(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ xStandard->setPropertyValue("WritingMode", uno::Any(text::WritingMode2::TB_RL));
+ {
+ uno::Reference<drawing::XShape> xShape(
+ xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
+ xShape->setSize(awt::Size(5000, 5000));
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ xShapeProps->setPropertyValue("AnchorType",
+ uno::Any(text::TextContentAnchorType_AT_CHARACTER));
+ uno::Reference<text::XTextContent> xShapeContent(xShape, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xShapeContent, /*bAbsorb=*/false);
+ }
+ uno::Reference<text::XTextContent> xLineBreak(
+ xFactory->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
+ auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL);
+ xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear));
+ xText->insertString(xCursor, "foo", /*bAbsorb=*/false);
+ xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
+ xText->insertString(xCursor, "bar", /*bAbsorb=*/false);
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure the "bar" does jump (logic) down the correct amount:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2837
+ // - Actual : 7135
+ // i.e. the expected break height is the twips value of the 5cm rectangle size, it was much
+ // more.
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout[1]/SwBreakPortion"_ostr, "height"_ostr,
+ "2837");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakHeader)
+{
+ // Given a document with a shape in the header and a clearing break in the body text:
+ createSwDoc("clearing-break-header.fodt");
+
+ // When laying out that document:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Then make sure that the shape from the header is ignored while calculating the line height:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 276
+ // - Actual : 15398
+ // i.e. the shape was in the background, but we failed to ignore it for the break portion.
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout[1]"_ostr, "height"_ostr, "276");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testAsCharImageDocModelFromViewPoint)
+{
+ // Given a document with an as-char image:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTextGraphic(
+ xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
+ // Only set the anchor type, the actual bitmap content is not interesting.
+ xTextGraphic->setPropertyValue("AnchorType",
+ uno::Any(text::TextContentAnchorType_AS_CHARACTER));
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xBodyText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor(xBodyText->createTextCursor());
+ uno::Reference<text::XTextContent> xTextContent(xTextGraphic, uno::UNO_QUERY);
+ xBodyText->insertTextContent(xCursor, xTextContent, false);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwRootFrame* pRootFrame = pWrtShell->GetLayout();
+ SwFrame* pPageFrame = pRootFrame->GetLower();
+ SwFrame* pBodyFrame = pPageFrame->GetLower();
+ SwFrame* pTextFrame = pBodyFrame->GetLower();
+ const SwSortedObjs& rSortedObjs = *pTextFrame->GetDrawObjs();
+ const SwAnchoredObject* pAnchoredObject = rSortedObjs[0];
+ // The content points to the start node, the next node is the graphic node.
+ SwNodeIndex aGraphicNode = *pAnchoredObject->GetFrameFormat()->GetContent().GetContentIdx();
+ ++aGraphicNode;
+ tools::Rectangle aFlyFrame = pAnchoredObject->GetDrawObj()->GetLastBoundRect();
+ Point aDocPos = aFlyFrame.Center();
+
+ // When translating the view point to the model position:
+ pWrtShell->SttCursorMove();
+ pWrtShell->CallSetCursor(&aDocPos, /*bOnlyText=*/false);
+ pWrtShell->EndCursorMove();
+
+ // Then make sure that we find the graphic node, and not its anchor:
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(/*bBlock=*/false);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: SwNodeIndex (node 6)
+ // - Actual : SwNodeIndex (node 12)
+ // i.e. the cursor position was the text node hosting the as-char image, not the graphic node of
+ // the image.
+ CPPUNIT_ASSERT_EQUAL(aGraphicNode.GetIndex(), pShellCursor->GetMark()->GetNodeIndex());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testRedlineDelete)
+{
+ // Given a document with A4 paper size, some text, redlining on, but hidden:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ {
+ // Set page size to A4.
+ size_t nCurIdx = pWrtShell->GetCurPageDesc();
+ SwPageDesc aPageDesc(pWrtShell->GetPageDesc(nCurIdx));
+ SwFrameFormat& rMaster = aPageDesc.GetMaster();
+ SwFormatFrameSize aSize(SwFrameSize::Fixed);
+ aSize.SetSize(Size(11906, 16838));
+ rMaster.SetFormatAttr(aSize);
+ pWrtShell->ChgPageDesc(nCurIdx, aPageDesc);
+ }
+ OUString aBefore("aaaaaaaaa aaaaaaaaaa aa aa aa ");
+ OUString aDelete("delete eeeeeeeeeee ee eeeeeeeeeee ee eeeeee");
+ pWrtShell->Insert(aBefore + " " + aDelete
+ + " zz zzz zzzzzzzzz zzz zzzz zzzz zzzzzzzzz zzzzzz zzz zzzzzzzzzzz zzz");
+ // Enable redlining.
+ pDocShell->SetChangeRecording(/*bActivate=*/true);
+ // Hide redlining.
+ pWrtShell->StartAllAction();
+ pWrtShell->GetLayout()->SetHideRedlines(true);
+ pWrtShell->EndAllAction();
+
+ // When deleting content in the middle of the paragraph:
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, /*nCount=*/aBefore.getLength(),
+ /*bBasicCall=*/false);
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/true, /*nCount=*/aDelete.getLength(),
+ /*bBasicCall=*/false);
+ // Without the accompanying fix in place, this test would have crashed:
+ pWrtShell->Delete();
+
+ // Then make sure that the redline is created:
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1),
+ pDoc->getIDocumentRedlineAccess().GetRedlineTable().size());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf120715_CursorMoveWhenTypingSpaceAtCenteredLineEnd)
+{
+ createSwDoc("tdf43100_tdf120715_cursorOnSpacesOverMargin.docx");
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // Make a paint to force the call of AddExtraBlankWidth, that calculate width for holePortions.
+ pDoc->GetDocShell()->GetPreviewBitmap();
+
+ // Move the cursor to the last character of the document.
+ pWrtShell->EndOfSection();
+
+ //Press space and check if the cursor move right with the additional space.
+ sal_Int32 nOldCursorPos = pWrtShell->GetCharRect().Left();
+ pWrtShell->Insert(" ");
+ sal_Int32 nNewCursorPos = pWrtShell->GetCharRect().Left();
+ CPPUNIT_ASSERT_GREATER(nOldCursorPos, nNewCursorPos);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf43100_CursorMoveToSpacesOverMargin)
+{
+ // Test the cursor movement over the right margin in several different paragraphs.
+ // These differences are based on its paragraphs
+ // - alignment (left, center, right, justified),
+ // - line count (1 line, 2 lines, blank line containing only spaces)
+ createSwDoc("tdf43100_tdf120715_cursorOnSpacesOverMargin.docx");
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // Make a paint to force the call of AddExtraBlankWidth, that calculate width for holePortions.
+ pDoc->GetDocShell()->GetPreviewBitmap();
+
+ // Move the cursor to the 2. line.
+ pWrtShell->Down(/*bSelect=*/false, 1, /*bBasicCall=*/false);
+ // Move the cursor to the right margin.
+ pWrtShell->RightMargin(false, false);
+
+ sal_Int32 nMarginPos = pWrtShell->GetCharRect().Left();
+ sal_Int32 nLastCursorPos = nMarginPos;
+
+ // Move the cursor right 5 times, every step should increase the cursor x position.
+ // Before this fix, the cursor stopped at the margin.
+ for (int i = 0; i < 5; i++)
+ {
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ sal_Int32 nNewCursorPos = pWrtShell->GetCharRect().Left();
+ CPPUNIT_ASSERT_GREATER(nLastCursorPos, nNewCursorPos);
+ nLastCursorPos = nNewCursorPos;
+ }
+
+ // Move down the cursor several lines, and check if it will keep nearly its horizontal position.
+ // Some of the lines are not reach beyond the margin, there the cursor won't be able to keep its
+ // original position.
+ bool aLineReachOverMargin[] = { false, true, true, false, false, true, true, false, true,
+ true, true, true, false, true, true, false, false };
+ // Cursor position can be a bit inaccurate, because it can only be positioned on characters,
+ // that is based on the actual line layout, therefore the actual cursor position
+ // is checked against a more distinct position instead of the nMarginPos.
+ sal_Int32 nAvgLeft = (nMarginPos + nLastCursorPos) / 2;
+ for (int i = 2; i < 17; i++)
+ {
+ pWrtShell->Down(/*bSelect=*/false, 1, /*bBasicCall=*/false);
+ sal_Int32 nNewCursorPos = pWrtShell->GetCharRect().Left();
+ if (aLineReachOverMargin[i])
+ CPPUNIT_ASSERT_GREATER(nAvgLeft, nNewCursorPos);
+ else
+ CPPUNIT_ASSERT_LESS(nAvgLeft, nNewCursorPos);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testContentControlPDF)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given a file with a content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::RICH_TEXT);
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ sal_Int32 nPlaceHolderLen = SwResId(STR_CONTENT_CONTROL_PLACEHOLDER).getLength();
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/true, nPlaceHolderLen,
+ /*bBasicCall=*/false);
+ pWrtShell->Insert("mycontent");
+ const SwPosition* pStart = pWrtShell->GetCursor()->Start();
+ SwTextNode* pTextNode = pStart->GetNode().GetTextNode();
+ sal_Int32 nIndex = pStart->GetContentIndex();
+ SwTextAttr* pAttr
+ = pTextNode->GetTextAttrAt(nIndex, RES_TXTATR_CONTENTCONTROL, sw::GetTextAttrMode::Parent);
+ auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
+ const SwFormatContentControl& rFormatContentControl = pTextContentControl->GetContentControl();
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ // Alias/title, to be mapped to PDF's description.
+ pContentControl->SetAlias("mydesc");
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure that a fillable form widget is emitted:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the content control was just exported as normal text.
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+ std::unique_ptr<vcl::pdf::PDFiumAnnotation> pAnnotation = pPage->getAnnotation(0);
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Widget, pAnnotation->getSubType());
+
+ // Also verify that the widget description is correct, it was empty:
+ CPPUNIT_ASSERT_EQUAL(OUString("mydesc"),
+ pAnnotation->getFormFieldAlternateName(pPdfDocument.get()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testContentControlPlaceholderPDF)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given a file with a content control, in placeholder mode:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::RICH_TEXT);
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure that a fillable form widget is emitted with the expected value:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+ std::unique_ptr<vcl::pdf::PDFiumAnnotation> pAnnotation = pPage->getAnnotation(0);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: Click here to enter text
+ // - Actual :
+ // i.e. the value of the content control was empty, the placeholder value was lost.
+ CPPUNIT_ASSERT_EQUAL(SwResId(STR_CONTENT_CONTROL_PLACEHOLDER),
+ pAnnotation->getFormFieldValue(pPdfDocument.get()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testCheckboxContentControlPDF)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given a file with a checkbox content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::CHECKBOX);
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure that a checkbox form widget is emitted:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the checkbox content control was just exported as normal text.
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+ std::unique_ptr<vcl::pdf::PDFiumAnnotation> pAnnotation = pPage->getAnnotation(0);
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Widget, pAnnotation->getSubType());
+ // Also check the form widget type:
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFFormFieldType::CheckBox,
+ pAnnotation->getFormFieldType(pPdfDocument.get()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testDropdownContentControlPDF)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given a file with a dropdown content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::DROP_DOWN_LIST);
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure that a dropdown form widget is emitted:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the dropdown content control was just exported as normal text.
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+ std::unique_ptr<vcl::pdf::PDFiumAnnotation> pAnnotation = pPage->getAnnotation(0);
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Widget, pAnnotation->getSubType());
+ // Also check the form widget type (our dropdown is called combo in PDF terms):
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFFormFieldType::ComboBox,
+ pAnnotation->getFormFieldType(pPdfDocument.get()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testDropdownContentControlPDF2)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ createSwDoc("tdf153040.docx");
+
+ save("writer_pdf_Export");
+
+ // Make sure that a dropdown form widget is emitted:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+
+ CPPUNIT_ASSERT_EQUAL(4, pPage->getAnnotationCount());
+ std::unique_ptr<vcl::pdf::PDFiumAnnotation> pAnnotation = pPage->getAnnotation(0);
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Widget, pAnnotation->getSubType());
+ // Also check the form widget type (our dropdown is called combo in PDF terms):
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFFormFieldType::ComboBox,
+ pAnnotation->getFormFieldType(pPdfDocument.get()));
+ // Without tdf#153040's fix, this would have been the empty OUString()
+ CPPUNIT_ASSERT_EQUAL(OUString("Apfel"), pAnnotation->getFormFieldValue(pPdfDocument.get()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testDateContentControlPDF)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given a file with a date content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::DATE);
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure that a date form widget is emitted:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the date content control was just exported as normal text.
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+ std::unique_ptr<vcl::pdf::PDFiumAnnotation> pAnnotation = pPage->getAnnotation(0);
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Widget, pAnnotation->getSubType());
+ // Also check the form widget type (our date is a mode of text in PDF terms):
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFFormFieldType::TextField,
+ pAnnotation->getFormFieldType(pPdfDocument.get()));
+ OUString aAction = pAnnotation->getFormAdditionalActionJavaScript(
+ pPdfDocument.get(), vcl::pdf::PDFAnnotAActionType::KeyStroke);
+ CPPUNIT_ASSERT_EQUAL(OUString("AFDate_KeystrokeEx(\"mm/dd/yy\");"), aAction);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testContentControlPDFFont)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given a document with a custom 24pt font size and a content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SfxItemSetFixed<RES_CHRATR_FONTSIZE, RES_CHRATR_FONTSIZE> aSet(pWrtShell->GetAttrPool());
+ SvxFontHeightItem aItem(480, 100, RES_CHRATR_FONTSIZE);
+ aSet.Put(aItem);
+ pWrtShell->SetAttrSet(aSet);
+ pWrtShell->InsertContentControl(SwContentControlType::RICH_TEXT);
+
+ // When exporting that document to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure that the widget in the PDF result has that custom font size:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ pPage->onAfterLoadPage(pPdfDocument.get());
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+ std::unique_ptr<vcl::pdf::PDFiumAnnotation> pAnnotation = pPage->getAnnotation(0);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 24
+ // - Actual : 8
+ // i.e. i.e. the font size was some default, not the 24pt specified in the model.
+ CPPUNIT_ASSERT_EQUAL(24.0f, pAnnotation->getFontSize(pPdfDocument.get()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testComboContentControlPDF)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given a file with a combo box content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::COMBO_BOX);
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure that a combo box form widget is emitted:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the combo box content control was exported as plain text.
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+ std::unique_ptr<vcl::pdf::PDFiumAnnotation> pAnnotation = pPage->getAnnotation(0);
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Widget, pAnnotation->getSubType());
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFFormFieldType::ComboBox,
+ pAnnotation->getFormFieldType(pPdfDocument.get()));
+ // 19th bit: combo box, not dropdown.
+ CPPUNIT_ASSERT(pAnnotation->getFormFieldFlags(pPdfDocument.get()) & 0x00040000);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testRichContentControlPDF)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given a file with a rich content control, its value set to "xxx<b>yyy</b>":
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::RICH_TEXT);
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ sal_Int32 nPlaceHolderLen = SwResId(STR_CONTENT_CONTROL_PLACEHOLDER).getLength();
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/true, nPlaceHolderLen,
+ /*bBasicCall=*/false);
+ pWrtShell->Insert("xxxyyy");
+ pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 3, /*bBasicCall=*/false);
+ SfxItemSetFixed<RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT> aSet(pWrtShell->GetAttrPool());
+ SvxWeightItem aItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
+ aSet.Put(aItem);
+ pWrtShell->SetAttrSet(aSet);
+
+ // When exporting to PDF:
+ save("writer_pdf_Export");
+
+ // Then make sure that a single fillable form widget is emitted:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. "xxx<b>yyy</b>" was exported as 2 widgets, not 1.
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testPlaceholderFieldPDF)
+{
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
+ // Given a file with a text-type placeholder field:
+ createSwDoc("placeholder.fodt");
+
+ // When exporting to PDF (default setting is "create a PDF form"):
+ save("writer_pdf_Export");
+
+ // Then make sure that a fillable form widget is emitted:
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. the placeholder field was just exported as normal text.
+ CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
+ std::unique_ptr<vcl::pdf::PDFiumAnnotation> pAnnotation = pPage->getAnnotation(0);
+ CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Widget, pAnnotation->getSubType());
+
+ // Also verify that the widget description is correct:
+ CPPUNIT_ASSERT_EQUAL(OUString("reference text"),
+ pAnnotation->getFormFieldAlternateName(pPdfDocument.get()));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testNumberPortionFormat)
+{
+ // Given a document with a single paragraph, direct formatting asks 24pt font size for the
+ // numbering and the text portion:
+ createSwDoc("number-portion-format.odt");
+
+ // When laying out that document:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Then make sure that the numbering portion has the correct font size:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 480
+ // - Actual : 240
+ // i.e. the numbering portion font size was 12pt, not 24pt (but only when the doc had a
+ // bookmark).
+ assertXPath(pXmlDoc,
+ "//SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']/SwFont"_ostr,
+ "height"_ostr, "480");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testNumberPortionNoformat)
+{
+ // Given a document with a numbering and a single paragraph, the entire run is red:
+ createSwDoc("number-portion-noformat.docx");
+
+ // When laying out that document:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Then make sure that just because the entire run is red, the numbering portion is not red:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: ffffffff (COL_AUTO)
+ // - Actual : 00ff0000 (COL_LIGHTRED)
+ // i.e. the run color affected the color of the number portion in Writer, but not in Word.
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("ffffffff"),
+ getXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr, "color"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf41652NBSPWidth)
+{
+ sal_Int32 nSectionAfterNBSPX_legacy_leftAligned;
+ sal_Int32 nSectionAfterNBSPX_legacy_justified;
+ sal_Int32 nSectionAfterNBSPX_optionDisabled_leftAligned;
+ sal_Int32 nSectionAfterNBSPX_optionDisabled_justified;
+ sal_Int32 nSectionAfterNBSPX_optionEnabled_leftAligned;
+ sal_Int32 nSectionAfterNBSPX_optionEnabled_justified;
+
+ // Measure the X position of sections after NBSPs in a legacy file (no option value set)
+ {
+ createSwDoc("tdf41652_legacy.fodt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump aDumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(aDumper, *xMetaFile);
+
+ nSectionAfterNBSPX_legacy_leftAligned
+ = getXPath(pXmlDoc, "//textarray[4]"_ostr, "x"_ostr).toInt32();
+ nSectionAfterNBSPX_legacy_justified
+ = getXPath(pXmlDoc, "//textarray[10]"_ostr, "x"_ostr).toInt32();
+ }
+
+ // Measure the X of sections after NBSPs in a file with the option enabled
+ {
+ createSwDoc("tdf41652_variableNBSPdisabled.fodt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump aDumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(aDumper, *xMetaFile);
+
+ nSectionAfterNBSPX_optionDisabled_leftAligned
+ = getXPath(pXmlDoc, "//textarray[4]"_ostr, "x"_ostr).toInt32();
+ nSectionAfterNBSPX_optionDisabled_justified
+ = getXPath(pXmlDoc, "//textarray[10]"_ostr, "x"_ostr).toInt32();
+ }
+
+ // Measure the X of the sections after NBSPs in a file with the option enabled
+ {
+ createSwDoc("tdf41652_variableNBSPenabled.fodt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump aDumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(aDumper, *xMetaFile);
+
+ nSectionAfterNBSPX_optionEnabled_leftAligned
+ = getXPath(pXmlDoc, "//textarray[4]"_ostr, "x"_ostr).toInt32();
+ nSectionAfterNBSPX_optionEnabled_justified
+ = getXPath(pXmlDoc, "//textarray[10]"_ostr, "x"_ostr).toInt32();
+ }
+
+ // Assert left aligned NBSP for the legacy file is larger than zero
+ CPPUNIT_ASSERT_GREATER(sal_Int32(0), nSectionAfterNBSPX_legacy_leftAligned);
+ // Assert both NBSPs have same width for the legacy file
+ CPPUNIT_ASSERT_EQUAL(nSectionAfterNBSPX_legacy_leftAligned,
+ nSectionAfterNBSPX_legacy_justified);
+ // Assert left aligned NBSP is same width for legacy file as for the disabled file
+ CPPUNIT_ASSERT_EQUAL(nSectionAfterNBSPX_legacy_leftAligned,
+ nSectionAfterNBSPX_optionDisabled_leftAligned);
+ // Assert justified NBSP is same width for legacy file as for the disabled file
+ CPPUNIT_ASSERT_EQUAL(nSectionAfterNBSPX_legacy_justified,
+ nSectionAfterNBSPX_optionDisabled_justified);
+ // Assert left aligned NBSP is same width for the disabled file as for the enabled file
+ CPPUNIT_ASSERT_EQUAL(nSectionAfterNBSPX_optionDisabled_leftAligned,
+ nSectionAfterNBSPX_optionEnabled_leftAligned);
+ // Assert justified NBSP is wider for the enabled file
+ CPPUNIT_ASSERT_GREATER(nSectionAfterNBSPX_optionDisabled_justified,
+ nSectionAfterNBSPX_optionEnabled_justified);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testFloattableOverlap)
+{
+ // Given a document with 2 floating tables, not overlapping in Word's "Word 2010" compat mode,
+ // because the first empty paragraph is below the first floating table:
+ createSwDoc("floattable-overlap.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure they don't overlap in Writer, either:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rPage1Objs.size());
+ SwAnchoredObject* pPage1Obj1 = rPage1Objs[0];
+ const SwRect& rRect1 = pPage1Obj1->GetObjRectWithSpaces();
+ SwAnchoredObject* pPage1Obj2 = rPage1Objs[1];
+ const SwRect& rRect2 = pPage1Obj2->GetObjRectWithSpaces();
+ // Without the accompanying fix in place, this test would have failed, the empty paragraph,
+ // which is after the floating table in the document model went above the floating table in the
+ // layout, which resulted in an overlap.
+ CPPUNIT_ASSERT(!rRect1.Overlaps(rRect2));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testFloattableAnchorNextPage)
+{
+ // Given a document with 3 floating tables, the last one has a negative vertical offset, so the
+ // floating table is on page 1, but its anchor frame is effectively on page 2:
+ createSwDoc("floattable-anchor-next-page.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure all 3 floating tables are on page 1:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = dynamic_cast<SwPageFrame*>(pLayout->Lower());
+ CPPUNIT_ASSERT(pPage1);
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ const SwSortedObjs& rPage1Objs = *pPage1->GetSortedObjs();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 3
+ // - Actual : 2
+ // i.e. the last floating table was on the wrong page (page 2).
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), rPage1Objs.size());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf89288)
+{
+ // Given a document with 2 paragraphs of mixed Complex and Western text,
+ // and 2 other paragraphs of mixed Western and Asian text:
+ createSwDoc("tdf89288.fodt");
+
+ // When laying out that document:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Then make sure there is no kern portions between the Western and Complex
+ // portions:
+ assertXPath(pXmlDoc, "//body/txt[1]/SwParaPortion/SwLineLayout/SwLinePortion"_ostr, 3);
+ assertXPath(pXmlDoc,
+ "//body/txt[1]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Text']"_ostr,
+ 3);
+ assertXPath(pXmlDoc,
+ "//body/txt[1]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Kern']"_ostr,
+ 0);
+
+ assertXPath(pXmlDoc, "//body/txt[2]/SwParaPortion/SwLineLayout/SwLinePortion"_ostr, 3);
+ assertXPath(pXmlDoc,
+ "//body/txt[2]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Text']"_ostr,
+ 3);
+ assertXPath(pXmlDoc,
+ "//body/txt[2]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Kern']"_ostr,
+ 0);
+
+ // But also make sure there is a kern portion between each Western and Asian
+ // portion:
+ assertXPath(pXmlDoc, "//body/txt[3]/SwParaPortion/SwLineLayout/SwLinePortion"_ostr, 5);
+ assertXPath(pXmlDoc,
+ "//body/txt[3]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Text']"_ostr,
+ 3);
+ assertXPath(pXmlDoc,
+ "//body/txt[3]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Kern']"_ostr,
+ 2);
+ assertXPath(pXmlDoc, "//body/txt[3]/SwParaPortion/SwLineLayout/SwLinePortion[2]"_ostr,
+ "type"_ostr, "PortionType::Kern");
+ assertXPath(pXmlDoc, "//body/txt[3]/SwParaPortion/SwLineLayout/SwLinePortion[4]"_ostr,
+ "type"_ostr, "PortionType::Kern");
+
+ assertXPath(pXmlDoc, "//body/txt[4]/SwParaPortion/SwLineLayout/SwLinePortion"_ostr, 5);
+ assertXPath(pXmlDoc,
+ "//body/txt[4]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Text']"_ostr,
+ 3);
+ assertXPath(pXmlDoc,
+ "//body/txt[4]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Kern']"_ostr,
+ 2);
+ assertXPath(pXmlDoc, "//body/txt[4]/SwParaPortion/SwLineLayout/SwLinePortion[2]"_ostr,
+ "type"_ostr, "PortionType::Kern");
+ assertXPath(pXmlDoc, "//body/txt[4]/SwParaPortion/SwLineLayout/SwLinePortion[4]"_ostr,
+ "type"_ostr, "PortionType::Kern");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf139863)
+{
+ // Given a document with 2 paragraphs of mixed Complex scripts:
+ createSwDoc("tdf139863.fodt");
+
+ // When laying out that document:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Then make sure the text is not split into multiple portions.
+ // Without the fix we don’t even reach here, as the old code resulted in a
+ // lone surrogate which can’t be converted to UTF-8 for the layout dump and
+ // we get an assert in OString::toUtf8().
+ assertXPath(pXmlDoc, "//body/txt[1]/SwParaPortion/SwLineLayout/child::*"_ostr, 1);
+ assertXPath(pXmlDoc, "//body/txt[2]/SwParaPortion/SwLineLayout/child::*"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testParaUpperMarginFlyIntersect)
+{
+ // Given a document with 2 paragraphs, the paragraphs have both upper and lower spacing of 567
+ // twips:
+ createSwDoc("para-upper-margin-fly-intersect.docx");
+
+ // When laying out that document:
+ calcLayout();
+
+ // Then make sure that we shift down the text in the second paragraph only based on the 2nd para
+ // upper margin, not based on the 1st para lower margin:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ int nFlyCount
+ = getXPathContent(
+ pXmlDoc,
+ "count(//SwParaPortion/SwLineLayout/child::*[@type='PortionType::Fly'])"_ostr)
+ .toInt32();
+ int nHeight = 0;
+ for (int i = 1; i <= nFlyCount; ++i)
+ {
+ OString xPath = "(//SwParaPortion/SwLineLayout/child::*[@type='PortionType::Fly'])["
+ + OString::number(i) + "]";
+ nHeight += getXPath(pXmlDoc, xPath, "height"_ostr).toInt32();
+ }
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 521 (~500)
+ // - Actual : 857 (~1000)
+ // I.e. both upper and lower margin was taken into account.
+ CPPUNIT_ASSERT_EQUAL(521, nHeight);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810)
+{
+ // Load the document.
+ // The document embeds a subset of "Source Han Serif SC" so that it works
+ // even when the font is not installed.
+ //
+ // Font subset created with:
+ //
+ // hb-subset SourceHanSerif.ttc -y 12 -u '20,3002,4FE1,540C,5E76,606F,610F,6237,6536,65B9,65E0,6B3E,6C42,7684,786E,8981,8BA4,8BEF,8D26,8D35,FF0C' -o SourceHanSerif.ttf
+ createSwDoc("tdf129810.odt");
+
+ // Render the document to a metafile.
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ CPPUNIT_ASSERT(xMetaFile);
+
+ // Find the first text array action
+ for (size_t nAction = 0; nAction < xMetaFile->GetActionSize(); nAction++)
+ {
+ auto pAction = xMetaFile->GetAction(nAction);
+ if (pAction->GetType() == MetaActionType::TEXTARRAY)
+ {
+ auto pTextArrayAction = static_cast<MetaTextArrayAction*>(pAction);
+ auto pDXArray = pTextArrayAction->GetDXArray();
+
+ // There should be 14 chars on the first line
+ CPPUNIT_ASSERT_EQUAL(size_t(14), pDXArray.size());
+
+ // Assert we are using the expected width for uncompressed chars
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(720), pDXArray[0]);
+ // Assert we are using the expected width for compressed chars
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(500), pDXArray[6] - pDXArray[5]);
+ break;
+ }
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testScriptinfosurrogatePairs)
+{
+ createSwDoc("scriptinfo-surrogate-pairs.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Test that a dotted circle is grouped with the mark after it, even if the
+ // mark is outside Unicode’s Basic Multilingual Plan (i.e. a surrogate pair
+ // in UTF-8)
+ //
+ // Without the fix it fails with:
+ // - Expected: 11
+ // - Actual : 11◌
+ assertXPath(pXmlDoc, "//txt[1]/SwParaPortion/SwLineLayout/SwLinePortion[1]"_ostr,
+ "portion"_ostr, u"11"_ustr);
+ assertXPath(pXmlDoc, "//txt[1]/SwParaPortion/SwLineLayout/SwLinePortion[2]"_ostr,
+ "portion"_ostr, u"\u25CC\U00010A01"_ustr);
+
+ // Without the fix this would crash because we got a lone surrogate that
+ // can’t be converted to UTF-8, but if it were not for that it might fail
+ // with something like:
+ // - Expected: 11
+ // - Actual : 11ð€
+ assertXPath(pXmlDoc, "//txt[2]/SwParaPortion/SwLineLayout/SwLinePortion[1]"_ostr,
+ "portion"_ostr, u"11"_ustr);
+ assertXPath(pXmlDoc, "//txt[2]/SwParaPortion/SwLineLayout/SwLinePortion[2]"_ostr,
+ "portion"_ostr, u"\U0001D400\u064E"_ustr);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf112594)
+{
+ createSwDoc("tdf112594.fodt");
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // Test that a NNBSP is grouped with the Mongolian characters after it
+ //
+ // Without the fix it fails with:
+ // - Expected: 11
+ // - Actual : 11\u202F
+ // (U+020F is a space, so might not be visible)
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwLinePortion[1]"_ostr, "portion"_ostr,
+ u"11"_ustr);
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwLinePortion[2]"_ostr, "portion"_ostr,
+ u"\u202F\u1824"_ustr);
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/core/text/widorp.cxx b/sw/qa/core/text/widorp.cxx
new file mode 100644
index 000000000000..9b2d65352f00
--- /dev/null
+++ b/sw/qa/core/text/widorp.cxx
@@ -0,0 +1,65 @@
+/* -*- 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 <memory>
+
+#include <IDocumentLayoutAccess.hxx>
+#include <doc.hxx>
+#include <frame.hxx>
+#include <layfrm.hxx>
+#include <pagefrm.hxx>
+#include <rootfrm.hxx>
+#include <txtfrm.hxx>
+#include <docsh.hxx>
+#include <wrtsh.hxx>
+#include <viewopt.hxx>
+
+namespace
+{
+/// Covers sw/source/core/text/widorp.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/text/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testHideWhitespaceWidorp)
+{
+ // Given a document with 3 paragraphs: 1.5 on page 1, 1.5 on page 2:
+ createSwDoc("hide-whitespace-widorp.odt");
+
+ // When hiding whitespace:
+ SwDocShell* pDocShell = getSwDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ SwViewOption aViewOptions(*pWrtShell->GetViewOptions());
+ aViewOptions.SetHideWhitespaceMode(true);
+ pWrtShell->ApplyViewOptions(aViewOptions);
+ calcLayout();
+
+ // Then make sure that paragraph 2 is still split:
+ SwDoc* pDoc = pDocShell->GetDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage);
+ SwFrame* pBody = pPage->FindBodyCont();
+ SwFrame* pPara1 = pBody->GetLower();
+ auto pPara2 = pPara1->GetNext()->DynCastTextFrame();
+ CPPUNIT_ASSERT(pPara2);
+ // Without the accompanying fix in place, this test would have failed, the entire paragraph 2
+ // went to page 1, so it was not split anymore.
+ CPPUNIT_ASSERT(pPara2->HasFollow());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/theme/ThemeTest.cxx b/sw/qa/core/theme/ThemeTest.cxx
new file mode 100644
index 000000000000..1c2f00e33c65
--- /dev/null
+++ b/sw/qa/core/theme/ThemeTest.cxx
@@ -0,0 +1,486 @@
+/* -*- 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 <memory>
+#include <docsh.hxx>
+#include <unotxdoc.hxx>
+#include <wrtsh.hxx>
+#include <drawdoc.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <svx/svdpage.hxx>
+#include <docmodel/uno/UnoComplexColor.hxx>
+#include <docmodel/theme/Theme.hxx>
+#include <ThemeColorChanger.hxx>
+#include <svx/ColorSets.hxx>
+
+using namespace css;
+
+namespace
+{
+class SwCoreThemeTest : public SwModelTestBase
+{
+public:
+ SwCoreThemeTest()
+ : SwModelTestBase("/sw/qa/core/theme/data/")
+ {
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(SwCoreThemeTest, testThemeColorInHeading)
+{
+ createSwDoc("ThemeColorInHeading.docx");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+
+ auto xComplexColor
+ = getProperty<uno::Reference<util::XComplexColor>>(getParagraph(1), "CharComplexColor");
+ auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+ CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, aComplexColor.getThemeColorType());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreThemeTest, testThemeColorInHeadingODT)
+{
+ createSwDoc("ThemeColorInHeading.fodt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+
+ auto xComplexColor
+ = getProperty<uno::Reference<util::XComplexColor>>(getParagraph(1), "CharComplexColor");
+ auto aComplexColor = model::color::getFromXComplexColor(xComplexColor);
+ CPPUNIT_ASSERT_EQUAL(model::ThemeColorType::Accent1, aComplexColor.getThemeColorType());
+}
+
+void checkFillStyles(std::vector<model::FillStyle> const& rStyleList)
+{
+ CPPUNIT_ASSERT_EQUAL(size_t(3), rStyleList.size());
+ // Fill style 1
+ {
+ model::FillStyle const& rFillStyle = rStyleList.at(0);
+ CPPUNIT_ASSERT(rFillStyle.mpFill);
+ CPPUNIT_ASSERT_EQUAL(model::FillType::Solid, rFillStyle.mpFill->meType);
+ auto* pSolidFill = static_cast<model::SolidFill*>(rFillStyle.mpFill.get());
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::Placeholder, pSolidFill->maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pSolidFill->maColor.getTransformations().size());
+ }
+
+ // Fill style 2
+ {
+ model::FillStyle const& rFillStyle = rStyleList.at(1);
+ CPPUNIT_ASSERT(rFillStyle.mpFill);
+ CPPUNIT_ASSERT_EQUAL(model::FillType::Gradient, rFillStyle.mpFill->meType);
+ auto* pGradientFill = static_cast<model::GradientFill*>(rFillStyle.mpFill.get());
+
+ // Gradient Properties
+ CPPUNIT_ASSERT_EQUAL(model::GradientType::Linear, pGradientFill->meGradientType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5400000), pGradientFill->maLinearGradient.mnAngle);
+ CPPUNIT_ASSERT_EQUAL(false, pGradientFill->maLinearGradient.mbScaled);
+
+ // Gradient stops
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pGradientFill->maGradientStops.size());
+ {
+ auto const& rGradientStop = pGradientFill->maGradientStops[0];
+ CPPUNIT_ASSERT_EQUAL(0.0, rGradientStop.mfPosition);
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::Placeholder, rGradientStop.maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(size_t(3), rGradientStop.maColor.getTransformations().size());
+
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[0];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(11000), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[1];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::SatMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(10500), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[2];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(6700), rTrasnsformation.mnValue);
+ }
+ }
+ {
+ auto const& rGradientStop = pGradientFill->maGradientStops[1];
+ CPPUNIT_ASSERT_EQUAL(0.5, rGradientStop.mfPosition);
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::Placeholder, rGradientStop.maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(size_t(3), rGradientStop.maColor.getTransformations().size());
+
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[0];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(10500), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[1];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::SatMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(10300), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[2];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(7300), rTrasnsformation.mnValue);
+ }
+ }
+ {
+ auto const& rGradientStop = pGradientFill->maGradientStops[2];
+ CPPUNIT_ASSERT_EQUAL(1.0, rGradientStop.mfPosition);
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::Placeholder, rGradientStop.maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(size_t(3), rGradientStop.maColor.getTransformations().size());
+
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[0];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(10500), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[1];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::SatMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(10900), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[2];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(8100), rTrasnsformation.mnValue);
+ }
+ }
+ }
+
+ // Fill style 3
+ {
+ model::FillStyle const& rFillStyle = rStyleList.at(2);
+ CPPUNIT_ASSERT(rFillStyle.mpFill);
+ CPPUNIT_ASSERT_EQUAL(model::FillType::Gradient, rFillStyle.mpFill->meType);
+ auto* pGradientFill = static_cast<model::GradientFill*>(rFillStyle.mpFill.get());
+
+ // Gradient Properties
+ CPPUNIT_ASSERT_EQUAL(model::GradientType::Linear, pGradientFill->meGradientType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5400000), pGradientFill->maLinearGradient.mnAngle);
+ CPPUNIT_ASSERT_EQUAL(false, pGradientFill->maLinearGradient.mbScaled);
+
+ // Gradient Stops
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pGradientFill->maGradientStops.size());
+ {
+ auto const& rGradientStop = pGradientFill->maGradientStops[0];
+ CPPUNIT_ASSERT_EQUAL(0.0, rGradientStop.mfPosition);
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::Placeholder, rGradientStop.maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(size_t(3), rGradientStop.maColor.getTransformations().size());
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[0];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::SatMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(10300), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[1];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(10200), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[2];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Tint, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(9400), rTrasnsformation.mnValue);
+ }
+ }
+ {
+ auto const& rGradientStop = pGradientFill->maGradientStops[1];
+ CPPUNIT_ASSERT_EQUAL(0.5, rGradientStop.mfPosition);
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::Placeholder, rGradientStop.maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(size_t(3), rGradientStop.maColor.getTransformations().size());
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[0];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::SatMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(11000), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[1];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(10000), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[2];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Shade, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(10000), rTrasnsformation.mnValue);
+ }
+ }
+ {
+ auto const& rGradientStop = pGradientFill->maGradientStops[2];
+ CPPUNIT_ASSERT_EQUAL(1.0, rGradientStop.mfPosition);
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::Placeholder, rGradientStop.maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(size_t(3), rGradientStop.maColor.getTransformations().size());
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[0];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::LumMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(9900), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[1];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::SatMod, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(12000), rTrasnsformation.mnValue);
+ }
+ {
+ auto const& rTrasnsformation = rGradientStop.maColor.getTransformations()[2];
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Shade, rTrasnsformation.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(7800), rTrasnsformation.mnValue);
+ }
+ }
+ }
+}
+
+void checkLineStyles(std::vector<model::LineStyle> const& rStyleList)
+{
+ CPPUNIT_ASSERT_EQUAL(size_t(3), rStyleList.size());
+ // Line style 1
+ {
+ model::LineStyle const& rLineStyle = rStyleList.at(0);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6350), rLineStyle.mnWidth);
+ CPPUNIT_ASSERT_EQUAL(model::CapType::Flat, rLineStyle.meCapType);
+ CPPUNIT_ASSERT_EQUAL(model::PenAlignmentType::Center, rLineStyle.mePenAlignment);
+ CPPUNIT_ASSERT_EQUAL(model::CompoundLineType::Single, rLineStyle.meCompoundLineType);
+ CPPUNIT_ASSERT_EQUAL(model::PresetDashType::Solid, rLineStyle.maLineDash.mePresetType);
+ CPPUNIT_ASSERT_EQUAL(model::LineJoinType::Miter, rLineStyle.maLineJoin.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(800000), rLineStyle.maLineJoin.mnMiterLimit);
+
+ model::FillStyle const& rFillStyle = rLineStyle.maLineFillStyle;
+ CPPUNIT_ASSERT(rFillStyle.mpFill);
+ CPPUNIT_ASSERT_EQUAL(model::FillType::Solid, rFillStyle.mpFill->meType);
+ auto* pSolidFill = static_cast<model::SolidFill*>(rFillStyle.mpFill.get());
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::Placeholder, pSolidFill->maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pSolidFill->maColor.getTransformations().size());
+ }
+
+ // Line style 2
+ {
+ model::LineStyle const& rLineStyle = rStyleList.at(1);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(12700), rLineStyle.mnWidth);
+ CPPUNIT_ASSERT_EQUAL(model::CapType::Flat, rLineStyle.meCapType);
+ CPPUNIT_ASSERT_EQUAL(model::PenAlignmentType::Center, rLineStyle.mePenAlignment);
+ CPPUNIT_ASSERT_EQUAL(model::CompoundLineType::Single, rLineStyle.meCompoundLineType);
+ CPPUNIT_ASSERT_EQUAL(model::PresetDashType::Solid, rLineStyle.maLineDash.mePresetType);
+ CPPUNIT_ASSERT_EQUAL(model::LineJoinType::Miter, rLineStyle.maLineJoin.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(800000), rLineStyle.maLineJoin.mnMiterLimit);
+
+ model::FillStyle const& rFillStyle = rLineStyle.maLineFillStyle;
+ CPPUNIT_ASSERT(rFillStyle.mpFill);
+ CPPUNIT_ASSERT_EQUAL(model::FillType::Solid, rFillStyle.mpFill->meType);
+ auto* pSolidFill = static_cast<model::SolidFill*>(rFillStyle.mpFill.get());
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::Placeholder, pSolidFill->maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pSolidFill->maColor.getTransformations().size());
+ }
+
+ // Line style 3
+ {
+ model::LineStyle const& rLineStyle = rStyleList.at(2);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(19050), rLineStyle.mnWidth);
+ CPPUNIT_ASSERT_EQUAL(model::CapType::Flat, rLineStyle.meCapType);
+ CPPUNIT_ASSERT_EQUAL(model::PenAlignmentType::Center, rLineStyle.mePenAlignment);
+ CPPUNIT_ASSERT_EQUAL(model::CompoundLineType::Single, rLineStyle.meCompoundLineType);
+ CPPUNIT_ASSERT_EQUAL(model::PresetDashType::Solid, rLineStyle.maLineDash.mePresetType);
+ CPPUNIT_ASSERT_EQUAL(model::LineJoinType::Miter, rLineStyle.maLineJoin.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(800000), rLineStyle.maLineJoin.mnMiterLimit);
+
+ model::FillStyle const& rFillStyle = rLineStyle.maLineFillStyle;
+ CPPUNIT_ASSERT(rFillStyle.mpFill);
+ CPPUNIT_ASSERT_EQUAL(model::FillType::Solid, rFillStyle.mpFill->meType);
+ auto* pSolidFill = static_cast<model::SolidFill*>(rFillStyle.mpFill.get());
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::Placeholder, pSolidFill->maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pSolidFill->maColor.getTransformations().size());
+ }
+}
+
+void checkEffects(std::vector<model::EffectStyle> const& rEffectStyleList)
+{
+ CPPUNIT_ASSERT_EQUAL(size_t(3), rEffectStyleList.size());
+ {
+ model::EffectStyle rEffectStyle = rEffectStyleList[0];
+ CPPUNIT_ASSERT_EQUAL(size_t(0), rEffectStyle.maEffectList.size());
+ }
+
+ {
+ model::EffectStyle rEffectStyle = rEffectStyleList[1];
+ CPPUNIT_ASSERT_EQUAL(size_t(0), rEffectStyle.maEffectList.size());
+ }
+
+ {
+ model::EffectStyle rEffectStyle = rEffectStyleList[2];
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rEffectStyle.maEffectList.size());
+ model::Effect const& rEffect = rEffectStyle.maEffectList[0];
+
+ CPPUNIT_ASSERT_EQUAL(model::EffectType::OuterShadow, rEffect.meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(57150), rEffect.mnBlurRadius);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(19050), rEffect.mnDistance);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5400000), rEffect.mnDirection);
+ CPPUNIT_ASSERT_EQUAL(model::RectangleAlignment::Center, rEffect.meAlignment);
+ CPPUNIT_ASSERT_EQUAL(false, rEffect.mbRotateWithShape);
+
+ CPPUNIT_ASSERT_EQUAL(model::ColorType::RGB, rEffect.maColor.getType());
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, rEffect.maColor.getRGB());
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rEffect.maColor.getTransformations().size());
+ CPPUNIT_ASSERT_EQUAL(model::TransformationType::Alpha,
+ rEffect.maColor.getTransformations()[0].meType);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(6300), rEffect.maColor.getTransformations()[0].mnValue);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreThemeTest, testDrawPageThemeExistsDOCX)
+{
+ createSwDoc("ThemeColorInHeading.docx");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+
+ SdrModel* pModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
+ CPPUNIT_ASSERT(pModel);
+ auto const& pTheme = pModel->getTheme();
+ CPPUNIT_ASSERT(pTheme);
+ CPPUNIT_ASSERT_EQUAL(u"Office Theme"_ustr, pTheme->GetName());
+
+ auto pColorSet = pTheme->getColorSet();
+ CPPUNIT_ASSERT(pColorSet);
+ CPPUNIT_ASSERT_EQUAL(u"Orange"_ustr, pColorSet->getName());
+
+ CPPUNIT_ASSERT_EQUAL(Color(0xE48312), pTheme->GetColor(model::ThemeColorType::Accent1));
+ CPPUNIT_ASSERT_EQUAL(Color(0xBD582C), pTheme->GetColor(model::ThemeColorType::Accent2));
+ CPPUNIT_ASSERT_EQUAL(Color(0x865640), pTheme->GetColor(model::ThemeColorType::Accent3));
+ CPPUNIT_ASSERT_EQUAL(Color(0x9B8357), pTheme->GetColor(model::ThemeColorType::Accent4));
+ CPPUNIT_ASSERT_EQUAL(Color(0xC2BC80), pTheme->GetColor(model::ThemeColorType::Accent5));
+ CPPUNIT_ASSERT_EQUAL(Color(0x94A088), pTheme->GetColor(model::ThemeColorType::Accent6));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, pTheme->GetColor(model::ThemeColorType::Dark1));
+ CPPUNIT_ASSERT_EQUAL(Color(0x637052), pTheme->GetColor(model::ThemeColorType::Dark2));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, pTheme->GetColor(model::ThemeColorType::Light1));
+ CPPUNIT_ASSERT_EQUAL(Color(0xCCDDEA), pTheme->GetColor(model::ThemeColorType::Light2));
+
+ model::FontScheme const& rFontScheme = pTheme->getFontScheme();
+ CPPUNIT_ASSERT_EQUAL(u"Calibri Light"_ustr, rFontScheme.getMajorLatin().maTypeface);
+ CPPUNIT_ASSERT_EQUAL(u"Calibri"_ustr, rFontScheme.getMinorLatin().maTypeface);
+ CPPUNIT_ASSERT_EQUAL(true, rFontScheme.getMajorAsian().maTypeface.isEmpty());
+ CPPUNIT_ASSERT_EQUAL(true, rFontScheme.getMinorAsian().maTypeface.isEmpty());
+ CPPUNIT_ASSERT_EQUAL(true, rFontScheme.getMajorComplex().maTypeface.isEmpty());
+ CPPUNIT_ASSERT_EQUAL(true, rFontScheme.getMinorComplex().maTypeface.isEmpty());
+ CPPUNIT_ASSERT_EQUAL(size_t(47), rFontScheme.getMajorSupplementalFontList().size());
+ CPPUNIT_ASSERT_EQUAL(size_t(47), rFontScheme.getMinorSupplementalFontList().size());
+ CPPUNIT_ASSERT_EQUAL(u"Angsana New"_ustr, rFontScheme.findMajorSupplementalTypeface(u"Thai"));
+ CPPUNIT_ASSERT_EQUAL(u"Cordia New"_ustr, rFontScheme.findMinorSupplementalTypeface(u"Thai"));
+
+ model::FormatScheme const& rFormatScheme = pTheme->getFormatScheme();
+ checkFillStyles(rFormatScheme.getFillStyleList());
+ checkLineStyles(rFormatScheme.getLineStyleList());
+ checkEffects(rFormatScheme.getEffectStyleList());
+ CPPUNIT_ASSERT_EQUAL(size_t(3), rFormatScheme.getBackgroundFillStyleList().size());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreThemeTest, testDrawPageThemeExistsODT)
+{
+ createSwDoc("ThemeColorInHeading.fodt");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+
+ SdrModel* pModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
+ CPPUNIT_ASSERT(pModel);
+ auto const& pTheme = pModel->getTheme();
+ CPPUNIT_ASSERT(pTheme);
+ CPPUNIT_ASSERT_EQUAL(u"Office Theme"_ustr, pTheme->GetName());
+
+ auto pColorSet = pTheme->getColorSet();
+ CPPUNIT_ASSERT(pColorSet);
+ CPPUNIT_ASSERT_EQUAL(u"Orange"_ustr, pColorSet->getName());
+
+ CPPUNIT_ASSERT_EQUAL(Color(0xE48312), pTheme->GetColor(model::ThemeColorType::Accent1));
+ CPPUNIT_ASSERT_EQUAL(Color(0xBD582C), pTheme->GetColor(model::ThemeColorType::Accent2));
+ CPPUNIT_ASSERT_EQUAL(Color(0x865640), pTheme->GetColor(model::ThemeColorType::Accent3));
+ CPPUNIT_ASSERT_EQUAL(Color(0x9B8357), pTheme->GetColor(model::ThemeColorType::Accent4));
+ CPPUNIT_ASSERT_EQUAL(Color(0xC2BC80), pTheme->GetColor(model::ThemeColorType::Accent5));
+ CPPUNIT_ASSERT_EQUAL(Color(0x94A088), pTheme->GetColor(model::ThemeColorType::Accent6));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, pTheme->GetColor(model::ThemeColorType::Dark1));
+ CPPUNIT_ASSERT_EQUAL(Color(0x637052), pTheme->GetColor(model::ThemeColorType::Dark2));
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, pTheme->GetColor(model::ThemeColorType::Light1));
+ CPPUNIT_ASSERT_EQUAL(Color(0xCCDDEA), pTheme->GetColor(model::ThemeColorType::Light2));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreThemeTest, testThemeChanging)
+{
+ createSwDoc("ThemeColorInHeading.docx");
+ SwDoc* pDoc = getSwDoc();
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SdrModel* pModel = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
+ CPPUNIT_ASSERT(pModel);
+
+ // Check current theme colors
+ {
+ auto const& pTheme = pModel->getTheme();
+ CPPUNIT_ASSERT(pTheme);
+ CPPUNIT_ASSERT_EQUAL(u"Office Theme"_ustr, pTheme->GetName());
+
+ auto pColorSet = pTheme->getColorSet();
+ CPPUNIT_ASSERT(pColorSet);
+ CPPUNIT_ASSERT_EQUAL(u"Orange"_ustr, pColorSet->getName());
+ CPPUNIT_ASSERT_EQUAL(Color(0xE48312), pTheme->GetColor(model::ThemeColorType::Accent1));
+ }
+
+ // Change theme colors
+ {
+ auto const& rColorSets = svx::ColorSets::get();
+ auto pNewColorSet = std::make_shared<model::ColorSet>(rColorSets.getColorSet(0));
+ // check that the theme colors are as expected
+ CPPUNIT_ASSERT_EQUAL(u"LibreOffice"_ustr, pNewColorSet->getName());
+
+ sw::ThemeColorChanger aChanger(pDoc->GetDocShell());
+ aChanger.apply(pNewColorSet);
+ }
+
+ // Check new theme colors
+ {
+ auto const& pTheme = pModel->getTheme();
+ CPPUNIT_ASSERT(pTheme);
+ CPPUNIT_ASSERT_EQUAL(u"Office Theme"_ustr, pTheme->GetName());
+
+ auto pColorSet = pTheme->getColorSet();
+ CPPUNIT_ASSERT(pColorSet);
+ CPPUNIT_ASSERT_EQUAL(u"LibreOffice"_ustr, pColorSet->getName());
+ CPPUNIT_ASSERT_EQUAL(Color(0x18A303), pTheme->GetColor(model::ThemeColorType::Accent1));
+ }
+
+ // Undo
+ pWrtShell->Undo();
+
+ // Check theme colors have been reverted
+ {
+ auto const& pTheme = pModel->getTheme();
+ CPPUNIT_ASSERT(pTheme);
+ CPPUNIT_ASSERT_EQUAL(u"Office Theme"_ustr, pTheme->GetName());
+
+ auto pColorSet = pTheme->getColorSet();
+ CPPUNIT_ASSERT(pColorSet);
+ CPPUNIT_ASSERT_EQUAL(u"Orange"_ustr, pColorSet->getName());
+ CPPUNIT_ASSERT_EQUAL(Color(0xE48312), pTheme->GetColor(model::ThemeColorType::Accent1));
+ }
+
+ // Redo
+ pWrtShell->Redo();
+
+ // Check theme colors have been applied again
+ {
+ auto const& pTheme = pModel->getTheme();
+ CPPUNIT_ASSERT(pTheme);
+ CPPUNIT_ASSERT_EQUAL(u"Office Theme"_ustr, pTheme->GetName());
+
+ auto pColorSet = pTheme->getColorSet();
+ CPPUNIT_ASSERT(pColorSet);
+ CPPUNIT_ASSERT_EQUAL(u"LibreOffice"_ustr, pColorSet->getName());
+ CPPUNIT_ASSERT_EQUAL(Color(0x18A303), pTheme->GetColor(model::ThemeColorType::Accent1));
+ }
+}
+
+} // end anonymous namnespace
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/theme/data/ThemeColorInHeading.docx b/sw/qa/core/theme/data/ThemeColorInHeading.docx
new file mode 100644
index 000000000000..e350c2676d41
--- /dev/null
+++ b/sw/qa/core/theme/data/ThemeColorInHeading.docx
Binary files differ
diff --git a/sw/qa/core/theme/data/ThemeColorInHeading.fodt b/sw/qa/core/theme/data/ThemeColorInHeading.fodt
new file mode 100644
index 000000000000..943a654623a0
--- /dev/null
+++ b/sw/qa/core/theme/data/ThemeColorInHeading.fodt
@@ -0,0 +1,391 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:initial-creator>Jan Holesovsky</meta:initial-creator><dc:creator>Jan Holesovsky</dc:creator><meta:editing-cycles>3</meta:editing-cycles><meta:creation-date>2021-04-01T13:52:00</meta:creation-date><dc:date>2021-04-01T14:06:00</dc:date><meta:editing-duration>PT3M</meta:editing-duration><meta:generator>LibreOfficeDev/7.6.0.0.alpha1$Linux_X86_64 LibreOffice_project/b1e712ba064530512e77a40bc354d8de9eb483e6</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="3" meta:word-count="13" meta:character-count="64" meta:non-whitespace-character-count="54"/><meta:user-defined meta:name="AppVersion">16.0000</meta:user-defined><meta:template xlink:type="simple" xlink:actuate="onRequest" xlink:title="Normal" xlink:href=""/></office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="ViewAreaWidth" config:type="long">23255</config:config-item>
+ <config:config-item config:name="ViewAreaHeight" config:type="long">12584</config:config-item>
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+ <config:config-item config:name="ViewLeft" config:type="long">3667</config:config-item>
+ <config:config-item config:name="ViewTop" config:type="long">3464</config:config-item>
+ <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+ <config:config-item config:name="VisibleRight" config:type="long">23253</config:config-item>
+ <config:config-item config:name="VisibleBottom" config:type="long">12582</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
+ <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ZoomFactor" config:type="short">180</config:config-item>
+ <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="KeepRatio" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+ <config:config-item config:name="WordLikeWrapForAsCharFlys" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HeaderSpacingBelowLastPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectBookmarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ContinuousEndnotes" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DisableOffPagePositioning" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintFaxName" config:type="string"/>
+ <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabOverSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClippedPictures" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FrameAutowidthWithMorePara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FloattableNomargins" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UnbreakableNumberings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseVariableWidthNBSP" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RsidRoot" config:type="int">1826887</config:config-item>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="Rsid" config:type="int">1826887</config:config-item>
+ <config:config-item config:name="FootnoteInColumnToPageEnd" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ProtectFields" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+ <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaLineSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="HyphenateURLs" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+ <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DropCapPunctuation" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MathBaselineAlignment" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string"/>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="AddParaTableSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+ <config:config-item config:name="TabOverflow" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="MsWordCompMinLineHeightByFly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+ <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmptyDbFieldHidesPara" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="TableRowKeep" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="NoNumberingShowFollowBy" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="InvertBorderSpacing" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="GutterAtTop" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+ <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+ <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Calibri" svg:font-family="Calibri" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Calibri Light" svg:font-family="&apos;Calibri Light&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Calibri1" svg:font-family="Calibri" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="F" svg:font-family="" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Sans CJK SC" svg:font-family="&apos;Noto Sans CJK SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Calibri" fo:font-size="11pt" fo:language="cs" fo:country="CZ" style:letter-kerning="false" style:font-name-asian="Calibri1" style:font-size-asian="11pt" style:language-asian="en" style:country-asian="US" style:font-name-complex="F" style:font-size-complex="11pt" style:language-complex="ar" style:country-complex="SA"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.249cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Calibri" fo:font-size="11pt" fo:language="cs" fo:country="CZ" style:letter-kerning="false" style:font-name-asian="Calibri1" style:font-size-asian="11pt" style:language-asian="en" style:country-asian="US" style:font-name-complex="F" style:font-size-complex="11pt" style:language-complex="ar" style:country-complex="SA" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.282cm" style:contextual-spacing="false" fo:line-height="108%" fo:text-align="start" style:justify-single-word="false" fo:orphans="2" fo:widows="2" style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Noto Sans CJK SC" style:font-family-asian="&apos;Noto Sans CJK SC&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lohit Devanagari1" style:font-family-complex="&apos;Lohit Devanagari&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lohit Devanagari" style:font-family-complex="&apos;Lohit Devanagari&apos;"/>
+ </style:style>
+ <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" style:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+ <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Lohit Devanagari" style:font-family-complex="&apos;Lohit Devanagari&apos;" style:font-size-complex="12pt" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lohit Devanagari" style:font-family-complex="&apos;Lohit Devanagari&apos;"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Standard" loext:linked-style-name="Heading_20_1_20_Char" style:default-outline-level="1" style:list-style-name="" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:keep-together="always" fo:keep-with-next="always"/>
+ <style:text-properties fo:color="#aa610d" loext:opacity="100%" style:font-name="Calibri Light" fo:font-family="&apos;Calibri Light&apos;" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="16pt" style:font-name-asian="F" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="16pt" style:font-name-complex="F" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="16pt">
+ <loext:char-complex-color loext:theme-type="accent1">
+ <loext:transformation loext:type="shade" loext:value="2539"/>
+ </loext:char-complex-color>
+ </style:text-properties>
+ </style:style>
+ <style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Standard" loext:linked-style-name="Heading_20_2_20_Char" style:default-outline-level="2" style:list-style-name="" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.071cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:keep-together="always" fo:keep-with-next="always"/>
+ <style:text-properties fo:color="#aa610d" loext:opacity="100%" style:font-name="Calibri Light" fo:font-family="&apos;Calibri Light&apos;" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="13pt" style:font-name-asian="F" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="13pt" style:font-name-complex="F" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="13pt">
+ <loext:char-complex-color loext:theme-type="accent1">
+ <loext:transformation loext:type="shade" loext:value="2539"/>
+ </loext:char-complex-color>
+ </style:text-properties>
+ </style:style>
+ <style:style style:name="Default_20_Paragraph_20_Font_20__28_WW_29_" style:display-name="Default Paragraph Font (WW)" style:family="text"/>
+ <style:style style:name="Heading_20_1_20_Char" style:display-name="Heading 1 Char" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font_20__28_WW_29_" loext:linked-style-name="Heading_20_1">
+ <style:text-properties fo:color="#aa610d" loext:opacity="100%" style:font-name="Calibri Light" fo:font-family="&apos;Calibri Light&apos;" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="16pt" style:font-name-asian="F" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="16pt" style:font-name-complex="F" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="16pt">
+ <loext:char-complex-color loext:theme-type="accent1">
+ <loext:transformation loext:type="shade" loext:value="2539"/>
+ </loext:char-complex-color>
+ </style:text-properties>
+ </style:style>
+ <style:style style:name="Heading_20_2_20_Char" style:display-name="Heading 2 Char" style:family="text" style:parent-style-name="Default_20_Paragraph_20_Font_20__28_WW_29_" loext:linked-style-name="Heading_20_2">
+ <style:text-properties fo:color="#aa610d" loext:opacity="100%" style:font-name="Calibri Light" fo:font-family="&apos;Calibri Light&apos;" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="13pt" style:font-name-asian="F" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="13pt" style:font-name-complex="F" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="13pt">
+ <loext:char-complex-color loext:theme-type="accent1">
+ <loext:transformation loext:type="shade" loext:value="2539"/>
+ </loext:char-complex-color>
+ </style:text-properties>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:list-style style:name="No_20_List_20__28_WW_29_" style:display-name="No List (WW)">
+ <text:list-level-style-number text:level="1" loext:num-list-format="%1%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm" fo:margin-left="1.27cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="2" loext:num-list-format="%2%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm" fo:margin-left="1.905cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="3" loext:num-list-format="%3%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm" fo:margin-left="2.54cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="4" loext:num-list-format="%4%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm" fo:margin-left="3.175cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="5" loext:num-list-format="%5%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm" fo:margin-left="3.81cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="6" loext:num-list-format="%6%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm" fo:margin-left="4.445cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="7" loext:num-list-format="%7%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm" fo:margin-left="5.08cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="8" loext:num-list-format="%8%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm" fo:margin-left="5.715cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="9" loext:num-list-format="%9%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm" fo:margin-left="6.35cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="10" loext:num-list-format="%10%." style:num-suffix="." style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm" fo:margin-left="6.985cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-number>
+ </text:list-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ <style:default-page-layout>
+ <style:page-layout-properties style:layout-grid-standard-mode="true"/>
+ </style:default-page-layout>
+ <loext:theme loext:name="Office Theme">
+ <loext:theme-colors loext:name="Orange">
+ <loext:color loext:name="dark1" loext:color="#000000"/>
+ <loext:color loext:name="light1" loext:color="#ffffff"/>
+ <loext:color loext:name="dark2" loext:color="#637052"/>
+ <loext:color loext:name="light2" loext:color="#ccddea"/>
+ <loext:color loext:name="accent1" loext:color="#e48312"/>
+ <loext:color loext:name="accent2" loext:color="#bd582c"/>
+ <loext:color loext:name="accent3" loext:color="#865640"/>
+ <loext:color loext:name="accent4" loext:color="#9b8357"/>
+ <loext:color loext:name="accent5" loext:color="#c2bc80"/>
+ <loext:color loext:name="accent6" loext:color="#94a088"/>
+ <loext:color loext:name="hyperlink" loext:color="#2998e3"/>
+ <loext:color loext:name="followed-hyperlink" loext:color="#8c8c8c"/>
+ </loext:theme-colors>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2.54cm" fo:margin-bottom="2.54cm" fo:margin-left="2.54cm" fo:margin-right="2.54cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="38" style:layout-grid-base-height="0.635cm" style:layout-grid-ruby-height="0cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:layout-grid-base-width="0.423cm" style:layout-grid-snap-to="true" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:h text:style-name="Heading_20_1" text:outline-level="1" loext:marker-style-name="T1"><text:span text:style-name="T1">Heading 1</text:span><text:span text:style-name="T1"/></text:h>
+ <text:h text:style-name="Heading_20_2" text:outline-level="2" loext:marker-style-name="T1"><text:span text:style-name="T1">Heading 2</text:span><text:span text:style-name="T1"/></text:h>
+ <text:p text:style-name="Standard" loext:marker-style-name="T1"><text:span text:style-name="T1">This is a test document in the “Orange†theme.</text:span></text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/core/tox/tox.cxx b/sw/qa/core/tox/tox.cxx
new file mode 100644
index 000000000000..89fc71a7eb33
--- /dev/null
+++ b/sw/qa/core/tox/tox.cxx
@@ -0,0 +1,258 @@
+/* -*- 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::Any(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::Any(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:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+
+ // 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::Any(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:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ 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::Any(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::Any(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/txtnode/data/floattable-anchor-split.docx b/sw/qa/core/txtnode/data/floattable-anchor-split.docx
new file mode 100644
index 000000000000..a5dcdb28eb8c
--- /dev/null
+++ b/sw/qa/core/txtnode/data/floattable-anchor-split.docx
Binary files differ
diff --git a/sw/qa/core/txtnode/data/fly-anchor-undo.odt b/sw/qa/core/txtnode/data/fly-anchor-undo.odt
new file mode 100644
index 000000000000..dd2093161fa5
--- /dev/null
+++ b/sw/qa/core/txtnode/data/fly-anchor-undo.odt
Binary files differ
diff --git a/sw/qa/core/txtnode/data/special-insert-after-merged-cells.fodt b/sw/qa/core/txtnode/data/special-insert-after-merged-cells.fodt
new file mode 100644
index 000000000000..55ba746b669c
--- /dev/null
+++ b/sw/qa/core/txtnode/data/special-insert-after-merged-cells.fodt
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <table:table table:name="Table1">
+ <table:table-column table:number-columns-repeated="2"/>
+ <table:table-row>
+ <table:table-cell>
+ <text:p/>
+ </table:table-cell>
+ <table:table-cell table:number-rows-spanned="2">
+ <text:p/>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell>
+ <text:p/>
+ </table:table-cell>
+ <table:covered-table-cell/>
+ </table:table-row>
+ </table:table>
+ <text:p/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/txtnode/data/tdf157287.odt b/sw/qa/core/txtnode/data/tdf157287.odt
new file mode 100644
index 000000000000..3ff6c4c6b9a6
--- /dev/null
+++ b/sw/qa/core/txtnode/data/tdf157287.odt
Binary files differ
diff --git a/sw/qa/core/txtnode/data/title-field-invalidate.fodt b/sw/qa/core/txtnode/data/title-field-invalidate.fodt
new file mode 100644
index 000000000000..e7d07cab7b63
--- /dev/null
+++ b/sw/qa/core/txtnode/data/title-field-invalidate.fodt
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta>
+ <dc:subject>mysubject</dc:subject>
+ <dc:title>mytitle</dc:title>
+ <meta:user-defined meta:name="Version" meta:value-type="string">1.1</meta:user-defined>
+ </office:meta>
+ <office:automatic-styles>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="14.8cm" fo:page-height="21.0cm" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm"/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:display-name="Standard" style:page-layout-name="pm1" style:next-style-name="Standard">
+ <style:footer>
+ <text:p><text:subject>mysubject</text:subject> <text:title>mytitle</text:title> <text:user-defined text:name="Version">1.1</text:user-defined> <text:modification-date>May 18, 2021</text:modification-date></text:p>
+ </style:footer>
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:p>body text</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/txtnode/justify.cxx b/sw/qa/core/txtnode/justify.cxx
new file mode 100644
index 000000000000..f8f178543a1f
--- /dev/null
+++ b/sw/qa/core/txtnode/justify.cxx
@@ -0,0 +1,185 @@
+/* -*- 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 <justify.hxx>
+#include <cstddef>
+#include <vector>
+
+namespace
+{
+/// Covers sw/source/core/txtnode/justify fixes.
+class SwCoreJustifyTest : public SwModelTestBase
+{
+};
+
+/// CharWidthArray: store char widths because they are more readable.
+class CharWidthArray
+{
+public:
+ KernArray maArray;
+ template <typename... Args> CharWidthArray(Args&&... args)
+ {
+ for (auto arg : { args... })
+ maArray.push_back(arg);
+ }
+ template <typename Function> void InvokeWithKernArray(Function f);
+ void ConvertToKernArray();
+ void ConvertToCharWidths();
+};
+
+inline bool operator==(const CharWidthArray& lhs, const CharWidthArray& rhs)
+{
+ return lhs.maArray == rhs.maArray;
+}
+
+std::ostream& operator<<(std::ostream& rStrm, const CharWidthArray& rCharWidthArray)
+{
+ const KernArray& rArray(rCharWidthArray.maArray);
+ sal_Int32 nLen = rArray.size();
+ rStrm << "{ ";
+ for (sal_Int32 i = 0; i < nLen; ++i)
+ {
+ rStrm << rArray[i];
+ rStrm << (i < nLen - 1 ? ", " : " ");
+ }
+ rStrm << "}";
+ return rStrm;
+}
+
+void CharWidthArray::ConvertToKernArray()
+{
+ for (std::size_t i = 1; i < maArray.size(); ++i)
+ maArray.adjust(i, maArray[i - 1]);
+}
+
+void CharWidthArray::ConvertToCharWidths()
+{
+ for (sal_Int32 i = maArray.size() - 1; i > 0; --i)
+ maArray.adjust(i, -maArray[i - 1]);
+}
+
+/// Convert maArray to kern array values, then invoke the function, and convert it back.
+template <typename Function> void CharWidthArray::InvokeWithKernArray(Function f)
+{
+ ConvertToKernArray();
+ f();
+ ConvertToCharWidths();
+}
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreJustifyTest, testSpaceDistributionHalfSpace)
+{
+ // Related to: tdf#149017
+ static constexpr OUStringLiteral aText = u"ne del pro";
+ CharWidthArray aActual{ 720, 639, 360, 720, 639, 400, 360, 720, 480, 720 };
+ CharWidthArray aExpected{ 720, 851, 573, 720, 639, 612, 573, 720, 480, 720 };
+
+ aActual.InvokeWithKernArray(
+ [&] { sw::Justify::SpaceDistribution(aActual.maArray, aText, 0, 10, 425, 0, false); });
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreJustifyTest, testSpaceDistributionNoHalfSpace)
+{
+ // Related to: tdf#149017
+ static constexpr OUStringLiteral aText = u"ne del pro";
+ CharWidthArray aActual{ 720, 639, 360, 720, 639, 400, 360, 720, 480, 720 };
+ CharWidthArray aExpected{ 720, 639, 785, 720, 639, 400, 785, 720, 480, 720 };
+
+ aActual.InvokeWithKernArray(
+ [&] { sw::Justify::SpaceDistribution(aActual.maArray, aText, 0, 10, 425, 0, true); });
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreJustifyTest, testSpaceDistributionUnicodeIVS)
+{
+ // Related to: tdf#148594
+ static constexpr OUStringLiteral aText
+ = u"\u9B54\u9AD8\u4E00\U000E01E1\u4E08\u4F55\u9B54\u9AD8\u4E00\U000E01E1";
+ CharWidthArray aActual{ 1600, 1600, 1600, 0, 0, 1600, 1600, 1600, 1600, 1600, 0, 0 };
+ CharWidthArray aExpected{ 1800, 1800, 1800, 0, 0, 1800, 1800, 1800, 1800, 1800, 0, 0 };
+ aActual.InvokeWithKernArray(
+ [&] { sw::Justify::SpaceDistribution(aActual.maArray, aText, 0, 12, 0, 200, false); });
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreJustifyTest, testSnapToGrid)
+{
+ tools::Long nDelta = 0;
+ // "曰〈é“高一尺化太平〉云云"
+ static constexpr OUStringLiteral aText
+ = u"\u66f0\u3008\u9053\u9ad8\u4e00\u5c3a\u5316\u592a\u5e73\u3009\u4e91\u4e91";
+ CharWidthArray aActual{ 880, 880, 880, 880, 880, 880, 880, 880, 880, 880, 880, 880 };
+ CharWidthArray aExpected{
+ 1360, 1040, 1200, 1200, 1200, 1200, 1200, 1200, 1040, 1360, 1200, 1040
+ };
+ aActual.InvokeWithKernArray(
+ [&] { nDelta = sw::Justify::SnapToGrid(aActual.maArray, aText, 0, 12, 400, false); });
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+ CPPUNIT_ASSERT_EQUAL(tools::Long(160), nDelta);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreJustifyTest, testSnapToGridMixWidth)
+{
+ // Related to: tdf#149365
+ tools::Long nDelta = 0;
+ // "中中中ケコサシスセソカケコ" ( mixing fullwidth ideograph and half-width kana )
+ static constexpr OUStringLiteral aText
+ = u"\u4e2d\u4e2d\u4e2d\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff76\uff79\uff7a";
+ CharWidthArray aActual{ 640, 640, 640, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320 };
+ CharWidthArray aExpected{ 800, 800, 760, 400, 400, 400, 400, 400, 400, 400, 400, 400, 360 };
+ aActual.InvokeWithKernArray(
+ [&] { nDelta = sw::Justify::SnapToGrid(aActual.maArray, aText, 0, 13, 400, false); });
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+ CPPUNIT_ASSERT_EQUAL(tools::Long(80), nDelta);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreJustifyTest, testSnapToGridIVS)
+{
+ // Related to: tdf#149214
+ tools::Long nDelta = 0;
+ static constexpr OUStringLiteral aText = u"\u9053\u9ad8\u4e00\U000E01E2\u5c3a\u5316";
+
+ CharWidthArray aActual{ 800, 800, 800, 0, 0, 800, 800 };
+ CharWidthArray aExpected{ 800, 800, 800, 0, 0, 800, 800 };
+ aActual.InvokeWithKernArray(
+ [&] { nDelta = sw::Justify::SnapToGrid(aActual.maArray, aText, 0, 7, 400, false); });
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), nDelta);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreJustifyTest, testSnapToGridEdge1)
+{
+ CharWidthArray aActual{ 640, 640, 640, 640, 640, 640, 320, 960 };
+ CharWidthArray aExpected{ 840, 840, 840, 840, 840, 840, 440, 1240 };
+ aActual.InvokeWithKernArray(
+ [&] { sw::Justify::SnapToGridEdge(aActual.maArray, 8, 400, 40, 0); });
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreJustifyTest, testSnapToGridEdge2)
+{
+ CharWidthArray aActual{ 640, 640, 640, 640, 640, 640, 320, 640 };
+ CharWidthArray aExpected{ 840, 840, 840, 840, 840, 840, 440, 840 };
+ aActual.InvokeWithKernArray(
+ [&] { sw::Justify::SnapToGridEdge(aActual.maArray, 8, 100, 40, 80); });
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreJustifyTest, testSnapToGridEdgeIVS)
+{
+ CharWidthArray aActual{ 640, 0, 0, 640, 640, 640, 640, 640 };
+ CharWidthArray aExpected{ 840, 0, 0, 840, 840, 840, 840, 840 };
+ aActual.InvokeWithKernArray(
+ [&] { sw::Justify::SnapToGridEdge(aActual.maArray, 8, 400, 40, 0); });
+ CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/txtnode/txtnode.cxx b/sw/qa/core/txtnode/txtnode.cxx
index a4c7baed8492..dec97c2ab910 100644
--- a/sw/qa/core/txtnode/txtnode.cxx
+++ b/sw/qa/core/txtnode/txtnode.cxx
@@ -9,19 +9,47 @@
#include <swmodeltestbase.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <comphelper/lok.hxx>
+#include <comphelper/propertyvalue.hxx>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <sfx2/viewsh.hxx>
#include <vcl/gdimtf.hxx>
+#include <vcl/scheduler.hxx>
+#include <sfx2/lokhelper.hxx>
+#include <test/lokcallback.hxx>
+#include <editeng/escapementitem.hxx>
+#include <IDocumentStatistics.hxx>
+#include <IDocumentLayoutAccess.hxx>
#include <fmtanchr.hxx>
#include <frameformats.hxx>
#include <wrtsh.hxx>
#include <unotxdoc.hxx>
#include <docsh.hxx>
-
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/txtnode/data/";
+#include <formatcontentcontrol.hxx>
+#include <view.hxx>
+#include <edtwin.hxx>
+#include <txatbase.hxx>
+#include <ndtxt.hxx>
+#include <textcontentcontrol.hxx>
+#include <swdtflvr.hxx>
+#include <txtrfmrk.hxx>
+#include <frmmgr.hxx>
+#include <formatflysplit.hxx>
+#include <ftnidx.hxx>
+#include <rootfrm.hxx>
+#include <pagefrm.hxx>
+#include <txtfrm.hxx>
/// Covers sw/source/core/txtnode/ fixes.
class SwCoreTxtnodeTest : public SwModelTestBase
{
+public:
+ SwCoreTxtnodeTest()
+ : SwModelTestBase("/sw/qa/core/txtnode/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testBtlrCellChinese)
@@ -30,23 +58,49 @@ CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testBtlrCellChinese)
// classified as vertical, i.e. the glyph has the same direction in both the lrtb ("Latin") and
// tbrl ("Chinese") directions. Make sure that Chinese text is handled the same way in the btlr
// case as it's handled in the Latin case.
- load(DATA_DIRECTORY, "btlr-cell-chinese.doc");
+ createSwDoc("btlr-cell-chinese.doc");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pShell = pTextDoc->GetDocShell();
std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
MetafileXmlDump dumper;
xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
- assertXPath(pXmlDoc, "//font[1]", "orientation", "900");
+ assertXPath(pXmlDoc, "//font[1]"_ostr, "orientation"_ostr, "900");
// Without the accompanying fix in place, this test would have failed with:
// - Expected: false
// - Actual : true
// i.e. the glyph was rotated further, so it was upside down.
- assertXPath(pXmlDoc, "//font[1]", "vertical", "false");
+ assertXPath(pXmlDoc, "//font[1]"_ostr, "vertical"_ostr, "false");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testSpecialInsertAfterMergedCells)
+{
+ // Load a document with a table with bottom right cells merged vertically.
+ // SpecialInsert with alt-Enter must work here, too.
+ createSwDoc("special-insert-after-merged-cells.fodt");
+ SwDoc* pDoc = getSwDoc();
+ SwNodeOffset const nNodes(pDoc->GetNodes().Count());
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pShell->GetWrtShell();
+ // go to the merged cell
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+
+ // When pressing alt-Enter on the keyboard:
+ SwEditWin& rEditWin = pWrtShell->GetView().GetEditWin();
+ vcl::KeyCode aKeyCode(KEY_RETURN, KEY_MOD2);
+ KeyEvent aKeyEvent(' ', aKeyCode);
+ rEditWin.KeyInput(aKeyEvent);
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: nNodes + 1
+ // - Actual : nNodes
+ // i.e. new empty paragraph wasn't inserted under the table
+ CPPUNIT_ASSERT_EQUAL(nNodes + 1, pDoc->GetNodes().Count());
}
CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testTextBoxCopyAnchor)
{
- load(DATA_DIRECTORY, "textbox-copy-anchor.docx");
+ createSwDoc("textbox-copy-anchor.docx");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pShell = pTextDoc->GetDocShell();
SwWrtShell* pWrtShell = pShell->GetWrtShell();
@@ -56,7 +110,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testTextBoxCopyAnchor)
pWrtShell->SttEndDoc(/*bStart=*/false);
pWrtShell->Paste(aClipboard);
- const SwFrameFormats& rFormats = *pShell->GetDoc()->GetSpzFrameFormats();
+ const auto& rFormats = *pShell->GetDoc()->GetSpzFrameFormats();
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 4
// - Actual : 6
@@ -65,16 +119,16 @@ CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testTextBoxCopyAnchor)
SwPosition aDrawAnchor1 = *rFormats[0]->GetAnchor().GetContentAnchor();
SwPosition aFlyAnchor1 = *rFormats[1]->GetAnchor().GetContentAnchor();
- CPPUNIT_ASSERT_EQUAL(aFlyAnchor1.nNode, aDrawAnchor1.nNode);
+ CPPUNIT_ASSERT_EQUAL(aFlyAnchor1.GetNodeIndex(), aDrawAnchor1.GetNodeIndex());
SwPosition aDrawAnchor2 = *rFormats[2]->GetAnchor().GetContentAnchor();
SwPosition aFlyAnchor2 = *rFormats[3]->GetAnchor().GetContentAnchor();
// This also failed, aFlyAnchor2 was wrong, as it got out of sync with aDrawAnchor2.
- CPPUNIT_ASSERT_EQUAL(aFlyAnchor2.nNode, aDrawAnchor2.nNode);
+ CPPUNIT_ASSERT_EQUAL(aFlyAnchor2.GetNodeIndex(), aDrawAnchor2.GetNodeIndex());
}
CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testTextBoxNodeSplit)
{
- load(DATA_DIRECTORY, "textbox-node-split.docx");
+ createSwDoc("textbox-node-split.docx");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pShell = pTextDoc->GetDocShell();
SwWrtShell* pWrtShell = pShell->GetWrtShell();
@@ -84,6 +138,407 @@ CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testTextBoxNodeSplit)
pWrtShell->SplitNode();
}
+namespace
+{
+struct ViewCallback
+{
+ int m_nInvalidations = 0;
+
+ static void callback(int nType, const char* pPayload, void* pData);
+ void callbackImpl(int nType, const char* pPayload);
+};
+
+void ViewCallback::callback(int nType, const char* pPayload, void* pData)
+{
+ static_cast<ViewCallback*>(pData)->callbackImpl(nType, pPayload);
+}
+
+void ViewCallback::callbackImpl(int nType, const char* /*pPayload*/)
+{
+ switch (nType)
+ {
+ case LOK_CALLBACK_INVALIDATE_TILES:
+ {
+ ++m_nInvalidations;
+ }
+ break;
+ }
+}
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testTitleFieldInvalidate)
+{
+ // Set up LOK to track invalidations.
+ comphelper::LibreOfficeKit::setActive(true);
+
+ // Given a document with a title field:
+ createSwDoc("title-field-invalidate.fodt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ pTextDoc->initializeForTiledRendering({});
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+ SwDoc* pDoc = pShell->GetDoc();
+ SwWrtShell* pWrtShell = pShell->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ ViewCallback aCallback;
+ TestLokCallbackWrapper aCallbackWrapper(&ViewCallback::callback, &aCallback);
+ pWrtShell->GetSfxViewShell()->setLibreOfficeKitViewCallback(&aCallbackWrapper);
+ aCallbackWrapper.setLOKViewId(SfxLokHelper::getView(pWrtShell->GetSfxViewShell()));
+ Scheduler::ProcessEventsToIdle();
+ aCallback.m_nInvalidations = 0;
+
+ // When typing to the document:
+ pWrtShell->Insert("x");
+ pWrtShell->GetSfxViewShell()->flushPendingLOKInvalidateTiles();
+
+ // Then make sure that only the text frame at the cursor is invalidated:
+ pDoc->getIDocumentStatistics().GetUpdatedDocStat(/*bCompleteAsync=*/true, /*bFields=*/false);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. the footer was also invalidated on each keypress.
+ CPPUNIT_ASSERT_EQUAL(1, aCallback.m_nInvalidations);
+
+ // Tear down LOK.
+ pWrtShell->GetSfxViewShell()->setLibreOfficeKitViewCallback(nullptr);
+ mxComponent->dispose();
+ mxComponent.clear();
+ comphelper::LibreOfficeKit::setActive(false);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testFlyAnchorUndo)
+{
+ // Given a document with a fly frame, anchored after the last char of the document:
+ createSwDoc("fly-anchor-undo.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pShell = pTextDoc->GetDocShell();
+ SwDoc* pDoc = pShell->GetDoc();
+ const auto& rSpz = *pDoc->GetSpzFrameFormats();
+ sal_Int32 nExpected = rSpz[0]->GetAnchor().GetAnchorContentOffset();
+
+ // When deleting that last character and undoing it:
+ SwWrtShell* pWrtShell = pShell->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->DelLeft();
+ pWrtShell->Undo();
+
+ // Then make sure the anchor position after the undo is the same as the original:
+ sal_Int32 nActual = rSpz[0]->GetAnchor().GetAnchorContentOffset();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 3
+ // - Actual : 2
+ // i.e. the anchor position was left unchanged by the undo.
+ CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testSplitNodeSuperscriptCopy)
+{
+ // Given a document with superscript text at the end of a paragraph:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Insert("1st");
+ pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/true, 2, /*bBasicCall=*/false);
+ SfxItemSetFixed<RES_CHRATR_ESCAPEMENT, RES_CHRATR_ESCAPEMENT> aSet(pWrtShell->GetAttrPool());
+ SvxEscapementItem aItem(SvxEscapement::Superscript, RES_CHRATR_ESCAPEMENT);
+ aSet.Put(aItem);
+ pWrtShell->SetAttrSet(aSet);
+
+ // When hitting enter at the end of the paragraph:
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->SplitNode(/*bAutoFormat=*/true);
+
+ // Then make sure that the superscript formatting doesn't appear on the next paragraph:
+ aSet.ClearItem(RES_CHRATR_ESCAPEMENT);
+ pWrtShell->GetCurAttr(aSet);
+ // Without the accompanying fix in place, this test would have failed, the unexpected
+ // superscript appeared in the next paragraph.
+ CPPUNIT_ASSERT(!aSet.HasItem(RES_CHRATR_ESCAPEMENT));
+}
+
+/* FIXME: behavior change reverted due to regression;
+ * see sw/source/core/txtnode/atrref.cxx
+ *CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testDontExpandRefmark)
+ *{
+ * // Given a document with a refmark:
+ * createSwDoc();
+ *
+ * uno::Sequence<css::beans::PropertyValue> aArgs = {
+ * comphelper::makePropertyValue("TypeName", uno::Any(OUString("SetRef"))),
+ * comphelper::makePropertyValue(
+ * "Name", uno::Any(OUString("ZOTERO_ITEM CSL_CITATION {} RNDpyJknp173F"))),
+ * comphelper::makePropertyValue("Content", uno::Any(OUString("foo"))),
+ * };
+ * dispatchCommand(mxComponent, ".uno:InsertField", aArgs);
+ *
+ * SwDoc* pDoc = getSwDoc();
+ * SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ * SwPosition& rCursor = *pWrtShell->GetCursor()->GetPoint();
+ * SwTextNode* pTextNode = rCursor.GetNode().GetTextNode();
+ * std::vector<SwTextAttr*> aAttrs
+ * = pTextNode->GetTextAttrsAt(rCursor.GetContentIndex(), RES_TXTATR_REFMARK);
+ *
+ * auto& rRefmark = const_cast<SwFormatRefMark&>(aAttrs[0]->GetRefMark());
+ * auto pTextRefMark = const_cast<SwTextRefMark*>(rRefmark.GetTextRefMark());
+ *
+ * // When typing after the refmark...
+ * pWrtShell->SttEndDoc(true);
+ * pWrtShell->Right(SwCursorSkipMode::Chars, false, 3, false);
+ * pWrtShell->Insert(" bar");
+ *
+ * // and skipping back to insert a comma after the refmark
+ * pWrtShell->Left(SwCursorSkipMode::Chars, false, 4, false);
+ * pWrtShell->Insert(",");
+ *
+ * // Without the accompanying fix in place, this test would have failed with:
+ * // - Expected: 3
+ * // - Actual : 4
+ * // i.e. the reference mark expanded
+ * CPPUNIT_ASSERT_EQUAL(3, static_cast<int>(*pTextRefMark->End()));
+ *}
+ */
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testInsertDropDownContentControlTwice)
+{
+ // Given an already selected dropdown content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::DROP_DOWN_LIST);
+
+ // When trying to insert an inner one, make sure that we don't crash:
+ pWrtShell->InsertContentControl(SwContentControlType::DROP_DOWN_LIST);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testCheckboxContentControlKeyboard)
+{
+ // Given an already selected checkbox content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::CHECKBOX);
+ SwEditWin& rEditWin = pWrtShell->GetView().GetEditWin();
+
+ // When pressing space on the keyboard:
+ KeyEvent aKeyEvent(' ', KEY_SPACE);
+ rEditWin.KeyInput(aKeyEvent);
+
+ // Then make sure the state is toggled:
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL);
+ auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ // Without the accompanying fix in place, this test would have failed, because the state
+ // remained unchanged.
+ CPPUNIT_ASSERT(pContentControl->GetChecked());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testDropdownContentControlKeyboard)
+{
+ // Given an already selected dropdown content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::DROP_DOWN_LIST);
+
+ // When checking if alt-down should open a popup:
+ SwTextContentControl* pTextContentControl = pWrtShell->CursorInsideContentControl();
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ vcl::KeyCode aKeyCode(KEY_DOWN, KEY_MOD2);
+ bool bShouldOpen = pContentControl->ShouldOpenPopup(aKeyCode);
+
+ // Then make sure that the answer is yes for dropdowns:
+ // Without the accompanying fix in place, this test would have failed, the dropdown popup was
+ // mouse-only.
+ CPPUNIT_ASSERT(bShouldOpen);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testPictureContentControlKeyboard)
+{
+ // Given an already selected picture content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::PICTURE);
+ pWrtShell->GotoObj(/*bNext=*/true, GotoObjFlags::Any);
+
+ // When checking if enter should trigger the file picker:
+ const SwFrameFormat* pFlyFormat = pWrtShell->GetFlyFrameFormat();
+ const SwFormatAnchor& rFormatAnchor = pFlyFormat->GetAnchor();
+ SwNode* pAnchorNode = rFormatAnchor.GetAnchorNode();
+ SwTextNode* pTextNode = pAnchorNode->GetTextNode();
+ SwTextAttr* pAttr
+ = pTextNode->GetTextAttrAt(rFormatAnchor.GetAnchorContentOffset(),
+ RES_TXTATR_CONTENTCONTROL, ::sw::GetTextAttrMode::Parent);
+ auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ bool bIsInteracting = pContentControl->IsInteractingCharacter('\r');
+
+ // Then make sure that the answer is yes for pictures:
+ // Without the accompanying fix in place, this test would have failed, the picture replacement
+ // file-picker was mouse-only.
+ CPPUNIT_ASSERT(bIsInteracting);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testDateContentControlKeyboard)
+{
+ // Given an already selected date content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::DATE);
+
+ // When checking if alt-down should open a popup:
+ SwTextContentControl* pTextContentControl = pWrtShell->CursorInsideContentControl();
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ vcl::KeyCode aKeyCode(KEY_DOWN, KEY_MOD2);
+ bool bShouldOpen = pContentControl->ShouldOpenPopup(aKeyCode);
+
+ // Then make sure that the answer is yes for date:
+ // Without the accompanying fix in place, this test would have failed, the date popup was
+ // mouse-only.
+ CPPUNIT_ASSERT(bShouldOpen);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testContentControlCopy)
+{
+ // Given a document with a content control:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->InsertContentControl(SwContentControlType::CHECKBOX);
+
+ // When copying that content control:
+ pWrtShell->SelAll();
+ rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
+ xTransfer->Copy();
+ // Kill the selection, go to the end of the document:
+ pWrtShell->EndOfSection();
+ TransferableDataHelper aHelper(xTransfer);
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ // Then make sure that the copy is also a checkbox:
+ SwContentControlManager& rManager = pDoc->GetContentControlManager();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rManager.GetCount());
+ const SwFormatContentControl& rFormat1 = rManager.Get(0)->GetContentControl();
+ CPPUNIT_ASSERT_EQUAL(SwContentControlType::CHECKBOX, rFormat1.GetContentControl()->GetType());
+ const SwFormatContentControl& rFormat2 = rManager.Get(1)->GetContentControl();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1 (CHECKBOX)
+ // - Actual : 0 (RICH_TEXT)
+ // i.e. properties were not copied from the source to the destination content control.
+ CPPUNIT_ASSERT_EQUAL(SwContentControlType::CHECKBOX, rFormat2.GetContentControl()->GetType());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testTdf157287)
+{
+ createSwDoc("tdf157287.odt");
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<text::XTextField> xField(xFields->nextElement(), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(OUString("30"), xField->getPresentation(false));
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+
+ uno::Reference<text::XTextRange> xCellA1(xTextTable->getCellByName("B1"), uno::UNO_QUERY);
+ xCellA1->setString("100");
+
+ dispatchCommand(mxComponent, ".uno:UpdateFields", {});
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 120
+ // - Actual :
+ CPPUNIT_ASSERT_EQUAL(OUString("120"), xField->getPresentation(false));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testFlySplitFootnote)
+{
+ // Given a document with a split fly (to host a table):
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ RndStdIds eAnchor = RndStdIds::FLY_AT_PARA;
+ pWrtShell->StartAllAction();
+ aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize());
+ pWrtShell->EndAllAction();
+ pWrtShell->StartAllAction();
+ sw::FrameFormats<sw::SpzFrameFormat*>& rFlys = *pDoc->GetSpzFrameFormats();
+ sw::SpzFrameFormat* pFly = rFlys[0];
+ SwAttrSet aSet(pFly->GetAttrSet());
+ aSet.Put(SwFormatFlySplit(true));
+ pDoc->SetAttr(aSet, *pFly);
+ pWrtShell->EndAllAction();
+ pWrtShell->UnSelectFrame();
+ pWrtShell->LeaveSelFrameMode();
+ pWrtShell->GetView().TriggerAttrChangedNotify();
+ pWrtShell->MoveSection(GoCurrSection, fnSectionEnd);
+
+ // When inserting a footnote:
+ pWrtShell->InsertFootnote(OUString());
+
+ // Then make sure the footnote gets inserted to the doc model.
+ // Without the accompanying fix in place, this test would have failed, insert code refused to
+ // have footnotes in all fly frames.
+ CPPUNIT_ASSERT(!pDoc->GetFootnoteIdxs().empty());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testSplitFlyAnchorSplit)
+{
+ // Given a document with a 2 pages long floating table:
+ createSwDoc("floattable-anchor-split.docx");
+
+ // When splitting the "AB" anchor text into "A" (remains as anchor text) and "B" (new text node
+ // after it):
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+ pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ // Without the accompanying fix in place, this test would have failed with a layout loop.
+ pWrtShell->SplitNode();
+
+ // Then make sure the resulting layout is what we want:
+ SwDoc* pDoc = getSwDoc();
+ SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+ auto pPage1 = pLayout->Lower()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage1);
+ // Page 1 has the master fly:
+ CPPUNIT_ASSERT(pPage1->GetSortedObjs());
+ auto pPage2 = pPage1->GetNext()->DynCastPageFrame();
+ CPPUNIT_ASSERT(pPage2);
+ // Page 2 has the follow fly:
+ CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+ // Anchor text is now just "A":
+ auto pText1 = pPage2->FindFirstBodyContent()->DynCastTextFrame();
+ CPPUNIT_ASSERT_EQUAL(OUString("A"), pText1->GetText());
+ // New text frame is just "B":
+ auto pText2 = pText1->GetNext()->DynCastTextFrame();
+ CPPUNIT_ASSERT_EQUAL(OUString("B"), pText2->GetText());
+
+ // Also test that the new follow anchor text frame still has a fly portion, otherwise the anchor
+ // text and the floating table would overlap:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ OUString aPortionType
+ = getXPath(pXmlDoc, "//page[2]/body/txt[1]/SwParaPortion/SwLineLayout[1]/child::*[1]"_ostr,
+ "type"_ostr);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: PortionType::Fly
+ // - Actual : PortionType::Para
+ // i.e. the fly portion was missing, text overlapped.
+ CPPUNIT_ASSERT_EQUAL(OUString("PortionType::Fly"), aPortionType);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/undo/data/anchor-type-change-position.docx b/sw/qa/core/undo/data/anchor-type-change-position.docx
new file mode 100644
index 000000000000..1a5d27b3f4b8
--- /dev/null
+++ b/sw/qa/core/undo/data/anchor-type-change-position.docx
Binary files differ
diff --git a/sw/qa/core/undo/data/image-as-character.odt b/sw/qa/core/undo/data/image-as-character.odt
new file mode 100644
index 000000000000..0b1aa6a21fb2
--- /dev/null
+++ b/sw/qa/core/undo/data/image-as-character.odt
Binary files differ
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..7b68e1b3b259 100644
--- a/sw/qa/core/undo/undo.cxx
+++ b/sw/qa/core/undo/undo.cxx
@@ -10,8 +10,6 @@
#include <swmodeltestbase.hxx>
#include <unotools/mediadescriptor.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/dispatch.hxx>
#include <unotxdoc.hxx>
#include <docsh.hxx>
@@ -19,20 +17,21 @@
#include <swdtflvr.hxx>
#include <frameformats.hxx>
#include <fmtcntnt.hxx>
-#include <view.hxx>
-#include <cmdid.h>
-
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/undo/data/";
/// Covers sw/source/core/undo/ fixes.
class SwCoreUndoTest : public SwModelTestBase
{
+public:
+ SwCoreUndoTest()
+ : SwModelTestBase("/sw/qa/core/undo/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testTextboxCutSave)
{
// Load the document and select all.
- load(DATA_DIRECTORY, "textbox-cut-save.docx");
+ createSwDoc("textbox-cut-save.docx");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pDocShell = pTextDoc->GetDocShell();
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
@@ -58,18 +57,16 @@ CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testTextboxCutSave)
CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testTextboxCutUndo)
{
- load(DATA_DIRECTORY, "textbox-cut-undo.docx");
+ createSwDoc("textbox-cut-undo.docx");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwDocShell* pDocShell = pTextDoc->GetDocShell();
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
SwDoc* pDoc = pDocShell->GetDoc();
- SwView* pView = pDoc->GetDocShell()->GetView();
- pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON);
- pView->StopShellTimer();
+ selectShape(1);
rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
pTransfer->Cut();
- SwFrameFormats& rSpzFrameFormats = *pDoc->GetSpzFrameFormats();
+ auto& rSpzFrameFormats = *pDoc->GetSpzFrameFormats();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), rSpzFrameFormats.size());
pWrtShell->Undo();
@@ -84,6 +81,101 @@ 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:
+ createSwDoc("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_TEST_FIXTURE(SwCoreUndoTest, testImagePropsCreateUndoAndModifyDoc)
+{
+ createSwDoc("image-as-character.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pDocShell = pTextDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ css::uno::Reference<css::beans::XPropertySet> xImage(
+ pTextDoc->getGraphicObjects()->getByName("Image1"), css::uno::UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT(pTextDoc->isSetModifiedEnabled());
+ CPPUNIT_ASSERT(!pTextDoc->isModified());
+ CPPUNIT_ASSERT(!pWrtShell->GetLastUndoInfo(nullptr, nullptr, nullptr));
+
+ // Check that modifications of the geometry mark document dirty, and create an undo
+
+ xImage->setPropertyValue("RelativeWidth", css::uno::Any(sal_Int16(80)));
+
+ // Without the fix, this would fail
+ CPPUNIT_ASSERT(pTextDoc->isModified());
+ CPPUNIT_ASSERT(pWrtShell->GetLastUndoInfo(nullptr, nullptr, nullptr));
+
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT(!pTextDoc->isModified());
+ CPPUNIT_ASSERT(!pWrtShell->GetLastUndoInfo(nullptr, nullptr, nullptr));
+
+ // Check that modifications of anchor mark document dirty, and create an undo
+
+ xImage->setPropertyValue("AnchorType",
+ css::uno::Any(css::text::TextContentAnchorType_AT_PARAGRAPH));
+
+ CPPUNIT_ASSERT(pTextDoc->isModified());
+ CPPUNIT_ASSERT(pWrtShell->GetLastUndoInfo(nullptr, nullptr, nullptr));
+
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT(!pTextDoc->isModified());
+ CPPUNIT_ASSERT(!pWrtShell->GetLastUndoInfo(nullptr, nullptr, nullptr));
+
+ // Check that setting the same values do not make it dirty and do not add undo
+
+ xImage->setPropertyValue("RelativeWidth", xImage->getPropertyValue("RelativeWidth"));
+ xImage->setPropertyValue("AnchorType", xImage->getPropertyValue("AnchorType"));
+
+ CPPUNIT_ASSERT(!pTextDoc->isModified());
+ CPPUNIT_ASSERT(!pWrtShell->GetLastUndoInfo(nullptr, nullptr, nullptr));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUndoTest, testAnchorTypeChangePosition)
+{
+ // Given a document with a textbox (draw + fly format pair) + an inner image:
+ createSwDoc("anchor-type-change-position.docx");
+ selectShape(1);
+ SwDoc* pDoc = getSwDoc();
+ const auto& rFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), rFormats.size());
+ Point aOldPos;
+ {
+ const SwFormatHoriOrient& rHoriOrient = rFormats[0]->GetHoriOrient();
+ const SwFormatVertOrient& rVertOrient = rFormats[0]->GetVertOrient();
+ aOldPos = Point(rHoriOrient.GetPos(), rVertOrient.GetPos());
+ }
+
+ // When changing the anchor type + undo:
+ dispatchCommand(mxComponent, ".uno:SetAnchorToChar", {});
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+
+ // Then make sure the old position is also restored:
+ const SwFormatHoriOrient& rHoriOrient = rFormats[0]->GetHoriOrient();
+ const SwFormatVertOrient& rVertOrient = rFormats[0]->GetVertOrient();
+ Point aNewPos(rHoriOrient.GetPos(), rVertOrient.GetPos());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 789,213
+ // - Actual : 1578,3425
+ // i.e. there was a big, unexpected increase in the vertical position after undo.
+ CPPUNIT_ASSERT_EQUAL(aOldPos, aNewPos);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/unocore/data/broken-embedded-object.odt b/sw/qa/core/unocore/data/broken-embedded-object.odt
new file mode 100644
index 000000000000..94a0809235e9
--- /dev/null
+++ b/sw/qa/core/unocore/data/broken-embedded-object.odt
Binary files differ
diff --git a/sw/qa/core/unocore/data/floattable-outer-nonsplit-inner.docx b/sw/qa/core/unocore/data/floattable-outer-nonsplit-inner.docx
new file mode 100644
index 000000000000..dc213b1b0d26
--- /dev/null
+++ b/sw/qa/core/unocore/data/floattable-outer-nonsplit-inner.docx
Binary files differ
diff --git a/sw/qa/core/unocore/data/floattable-split.docx b/sw/qa/core/unocore/data/floattable-split.docx
new file mode 100644
index 000000000000..2e2c9c705df9
--- /dev/null
+++ b/sw/qa/core/unocore/data/floattable-split.docx
Binary files differ
diff --git a/sw/qa/core/unocore/data/graphic.png b/sw/qa/core/unocore/data/graphic.png
new file mode 100644
index 000000000000..fdad35484e7c
--- /dev/null
+++ b/sw/qa/core/unocore/data/graphic.png
Binary files differ
diff --git a/sw/qa/core/unocore/data/paragraph-marker-formatted-run.docx b/sw/qa/core/unocore/data/paragraph-marker-formatted-run.docx
new file mode 100644
index 000000000000..c0635c157cc9
--- /dev/null
+++ b/sw/qa/core/unocore/data/paragraph-marker-formatted-run.docx
Binary files differ
diff --git a/sw/qa/core/unocore/data/paragraph-marker.docx b/sw/qa/core/unocore/data/paragraph-marker.docx
new file mode 100644
index 000000000000..8dac2d96c76d
--- /dev/null
+++ b/sw/qa/core/unocore/data/paragraph-marker.docx
Binary files differ
diff --git a/sw/qa/core/unocore/data/tdf108272-1-minimal.docx b/sw/qa/core/unocore/data/tdf108272-1-minimal.docx
new file mode 100644
index 000000000000..28efdf65b9af
--- /dev/null
+++ b/sw/qa/core/unocore/data/tdf108272-1-minimal.docx
Binary files differ
diff --git a/sw/qa/core/unocore/data/tdf149555.docx b/sw/qa/core/unocore/data/tdf149555.docx
new file mode 100644
index 000000000000..b1f983c3402f
--- /dev/null
+++ b/sw/qa/core/unocore/data/tdf149555.docx
Binary files differ
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 62c3f439c4e5..3e52b12a363c 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -9,30 +9,47 @@
#include <swmodeltestbase.hxx>
+#include <com/sun/star/text/BibliographyDataType.hpp>
#include <com/sun/star/text/XTextAppend.hpp>
#include <com/sun/star/text/XTextFrame.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XDependentTextField.hpp>
+#include <com/sun/star/document/XDocumentInsertable.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XPageCursor.hpp>
+
+#include <comphelper/propertyvalue.hxx>
+#include <comphelper/sequenceashashmap.hxx>
+#include <vcl/errinf.hxx>
+#include <editeng/wghtitem.hxx>
#include <wrtsh.hxx>
#include <unotextrange.hxx>
#include <unotxdoc.hxx>
#include <docsh.hxx>
+#include <ndtxt.hxx>
+#include <textlinebreak.hxx>
+#include <textcontentcontrol.hxx>
+#include <frmmgr.hxx>
+#include <fmtcntnt.hxx>
using namespace ::com::sun::star;
-namespace
-{
-constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/unocore/data/";
-}
-
/// Covers sw/source/core/unocore/ fixes.
class SwCoreUnocoreTest : public SwModelTestBase
{
+public:
+ SwCoreUnocoreTest()
+ : SwModelTestBase("/sw/qa/core/unocore/data/")
+ {
+ }
};
CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf119081)
{
// Load a doc with a nested table in it.
- load(DATA_DIRECTORY, "tdf119081.odt");
+ createSwDoc("tdf119081.odt");
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
SwDocShell* pDocShell = pTextDoc->GetDocShell();
@@ -41,14 +58,14 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf119081)
// Enter outer A1.
pWrtShell->Down(/*bSelect=*/false, /*nCount=*/3);
// Enter inner A1.
- pWrtShell->Right(CRSR_SKIP_CELLS, /*bSelect=*/false, /*nCount=*/1, /*bBasicCall=*/false,
+ pWrtShell->Right(SwCursorSkipMode::Cells, /*bSelect=*/false, /*nCount=*/1, /*bBasicCall=*/false,
/*bVisual=*/true);
// Enter outer B1.
pWrtShell->Down(/*bSelect=*/false, /*nCount=*/2);
SwDoc* pDoc = pDocShell->GetDoc();
SwPaM& rCursor = pWrtShell->GetCurrentShellCursor();
- uno::Reference<text::XTextRange> xInsertPosition
+ rtl::Reference<SwXTextRange> xInsertPosition
= SwXTextRange::CreateXTextRange(*pDoc, *rCursor.GetPoint(), nullptr);
uno::Reference<text::XTextAppend> xTextAppend(xInsertPosition->getText(), uno::UNO_QUERY);
// Without the accompanying fix in place, this test would have failed with:
@@ -56,21 +73,47 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf119081)
xTextAppend->insertTextPortion("x", {}, xInsertPosition);
// Verify that the string is indeed inserted.
- pWrtShell->Left(CRSR_SKIP_CELLS, /*bSelect=*/true, /*nCount=*/1, /*bBasicCall=*/false,
+ pWrtShell->Left(SwCursorSkipMode::Cells, /*bSelect=*/true, /*nCount=*/1, /*bBasicCall=*/false,
/*bVisual=*/true);
CPPUNIT_ASSERT_EQUAL(OUString("x"), pWrtShell->GetCurrentShellCursor().GetText());
}
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, selectTextRange)
+{
+ createSwDoc();
+ uno::Reference<text::XTextDocument> const xTD(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<text::XText> const xText(xTD->getText());
+ uno::Reference<text::XTextCursor> const xCursor(xText->createTextCursor());
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(false);
+ xCursor->gotoEnd(true);
+ CPPUNIT_ASSERT_EQUAL(OUString("test"), xCursor->getString());
+ uno::Reference<lang::XMultiServiceFactory> const xMSF(mxComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<text::XTextSection> const xSection(
+ xMSF->createInstance("com.sun.star.text.TextSection"), uno::UNO_QUERY_THROW);
+ xText->insertTextContent(xCursor, xSection, true);
+ uno::Reference<text::XTextRange> const xAnchor(xSection->getAnchor());
+ uno::Reference<view::XSelectionSupplier> const xView(xTD->getCurrentController(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("test"), xAnchor->getString());
+ CPPUNIT_ASSERT(xView->select(uno::Any(xAnchor)));
+ uno::Reference<container::XIndexAccess> xSel;
+ CPPUNIT_ASSERT(xView->getSelection() >>= xSel);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSel->getCount());
+ uno::Reference<text::XTextRange> xSelRange;
+ CPPUNIT_ASSERT(xSel->getByIndex(0) >>= xSelRange);
+ CPPUNIT_ASSERT_EQUAL(OUString("test"), xSelRange->getString());
+}
+
CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor)
{
- mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
+ createSwDoc();
uno::Reference<lang::XMultiServiceFactory> const xMSF(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextDocument> const xTD(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextFrame> const xTextFrame(
xMSF->createInstance("com.sun.star.text.TextFrame"), uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> const xFrameProps(xTextFrame, uno::UNO_QUERY_THROW);
- xFrameProps->setPropertyValue("AnchorType",
- uno::makeAny(text::TextContentAnchorType_AT_PARAGRAPH));
+ xFrameProps->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AT_PARAGRAPH));
auto const xText = xTD->getText();
auto const xTextCursor = xText->createTextCursor();
CPPUNIT_ASSERT(xTextCursor.is());
@@ -78,10 +121,970 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor)
auto const xAnchor = xTextFrame->getAnchor();
uno::Reference<text::XTextContent> const xFieldmark(
xMSF->createInstance("com.sun.star.text.Fieldmark"), uno::UNO_QUERY_THROW);
- // this crashed because the anchor didn't have SwIndex
+ // this crashed because the anchor didn't have SwContentIndex
xText->insertTextContent(xAnchor, xFieldmark, false);
}
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testRtlGutter)
+{
+ createSwDoc();
+ 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::Any(true));
+ bRtlGutter = getProperty<bool>(xPageStyle, "RtlGutter");
+ CPPUNIT_ASSERT(bRtlGutter);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testBiblioLocalCopy)
+{
+ // Given an empty document:
+ createSwDoc();
+
+ // When setting the LocalURL of a biblio field:
+ 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("Me")),
+ comphelper::makePropertyValue("Title", OUString("mytitle")),
+ comphelper::makePropertyValue("Year", OUString("2020")),
+ comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf")),
+ comphelper::makePropertyValue("LocalURL", OUString("file:///home/me/test.pdf")),
+ };
+ xField->setPropertyValue("Fields", uno::Any(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 we get that LocalURL back:
+ comphelper::SequenceAsHashMap aMap(xField->getPropertyValue("Fields"));
+ // Without the accompanying fix in place, this test would have failed, there was no LocalURL key
+ // in the map.
+ CPPUNIT_ASSERT(aMap.find("LocalURL") != aMap.end());
+ auto aActual = aMap["LocalURL"].get<OUString>();
+ CPPUNIT_ASSERT_EQUAL(OUString("file:///home/me/test.pdf"), aActual);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLinkedStyles)
+{
+ // Given an empty document:
+ createSwDoc();
+
+ // When defining a linked style for a para style:
+ uno::Reference<container::XNameAccess> xParaStyles = getStyles("ParagraphStyles");
+ uno::Reference<beans::XPropertySet> xParaStyle(xParaStyles->getByName("Caption"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(xParaStyle, "LinkStyle"));
+ xParaStyle->setPropertyValue("LinkStyle", uno::Any(OUString("Emphasis")));
+ // Then make sure we get the linked char style back:
+ CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(xParaStyle, "LinkStyle"));
+
+ // When defining a linked style for a char style:
+ uno::Reference<container::XNameAccess> xCharStyles = getStyles("CharacterStyles");
+ uno::Reference<beans::XPropertySet> xCharStyle(xCharStyles->getByName("Emphasis"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(xCharStyle, "LinkStyle"));
+ xCharStyle->setPropertyValue("LinkStyle", uno::Any(OUString("Caption")));
+ // Then make sure we get the linked para style back:
+ CPPUNIT_ASSERT_EQUAL(OUString("Caption"), getProperty<OUString>(xCharStyle, "LinkStyle"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testViewCursorTextFrame)
+{
+ // Given a document with a graphic and holding a reference to that graphic frame:
+ createSwDoc();
+ uno::Sequence<beans::PropertyValue> aInsertArgs
+ = { comphelper::makePropertyValue("FileName", createFileURL(u"graphic.png")) };
+ dispatchCommand(mxComponent, ".uno:InsertGraphic", aInsertArgs);
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
+ xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xViewCursor(xTextViewCursorSupplier->getViewCursor(),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame;
+ xViewCursor->getPropertyValue("TextFrame") >>= xFrame;
+
+ // When saving to ODT, then make sure the store doesn't fail:
+ uno::Reference<frame::XStorable> xStorable(xModel, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aStoreArgs
+ = { comphelper::makePropertyValue("FilterName", OUString("writer8")) };
+ // Without the accompanying fix in place, this test would have failed with:
+ // uno.RuntimeException: "SwXParagraph: disposed or invalid ..."
+ xStorable->storeToURL(maTempFile.GetURL(), aStoreArgs);
+}
+
+/// Fails the test if an error popup would be presented.
+static void BasicDisplayErrorHandler(const OUString& /*rErr*/, const OUString& /*rAction*/)
+{
+ CPPUNIT_ASSERT(false);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testBrokenEmbeddedObject)
+{
+ // Given a document with a broken embedded object (the XML markup is not well-formed):
+ createSwDoc("broken-embedded-object.odt");
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xObjects(xSupplier->getEmbeddedObjects(),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xObject(xObjects->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<lang::XServiceInfo> xEmbeddedObject;
+ // Get the property first, which initializes Draw, which would overwrite our error handler.
+ xObject->getPropertyValue("EmbeddedObject") >>= xEmbeddedObject;
+ ErrorRegistry::RegisterDisplay(&BasicDisplayErrorHandler);
+
+ // When trying to load that embedded object:
+ xObject->getPropertyValue("EmbeddedObject") >>= xEmbeddedObject;
+
+ // Then make sure we get a non-empty reference and an error popup it not shown:
+ CPPUNIT_ASSERT(xEmbeddedObject.is());
+ // Without the accompanying fix in place, we got this reference, but first an error popup was
+ // shown to the user.
+ CPPUNIT_ASSERT(
+ xEmbeddedObject->supportsService("com.sun.star.comp.embed.OCommonEmbeddedObject"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLineBreakInsert)
+{
+ // Given an empty document:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+
+ // When inserting a line-break with properties:
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xLineBreak(
+ xMSF->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
+ auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL);
+ xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear));
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
+
+ // Then make sure that both the line break and its matching text attribute is inserted:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex();
+ SwTextNode* pTextNode = pDoc->GetNodes()[nIndex]->GetTextNode();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: "\n" (newline)
+ // - Actual : "" (empty string)
+ // i.e. SwXLineBreak::attach() did not insert the newline + its text attribute.
+ CPPUNIT_ASSERT_EQUAL(OUString("\n"), pTextNode->GetText());
+ SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_LINEBREAK);
+ CPPUNIT_ASSERT(pAttr);
+ auto pTextLineBreak = static_cast<SwTextLineBreak*>(pAttr);
+ auto& rFormatLineBreak = static_cast<SwFormatLineBreak&>(pTextLineBreak->GetAttr());
+ CPPUNIT_ASSERT_EQUAL(SwLineBreakClear::ALL, rFormatLineBreak.GetValue());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLineBreakTextPortionEnum)
+{
+ // Given a document with a clearing break:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xLineBreak(
+ xMSF->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
+ auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL);
+ xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear));
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
+
+ // When enumerating the text portions of the only paragraph in the document:
+ uno::Reference<css::text::XTextRange> xTextPortion = getRun(getParagraph(1), 1);
+
+ // Then make sure that the text portion type is correct + the clear type can be read:
+ auto aPortionType = getProperty<OUString>(xTextPortion, "TextPortionType");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: LineBreak
+ // - Actual : Text
+ // i.e. a line break with properties was part of the normal Text portion, making it impossible
+ // to get those properties.
+ CPPUNIT_ASSERT_EQUAL(OUString("LineBreak"), aPortionType);
+ xLineBreak = getProperty<uno::Reference<text::XTextContent>>(xTextPortion, "LineBreak");
+ eClear = getProperty<sal_Int16>(xLineBreak, "Clear");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(SwLineBreakClear::ALL), eClear);
+}
+
+CPPUNIT_TEST_FIXTURE(SwModelTestBase, testUserFieldTooltip)
+{
+ // Given a document with a user field:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XDependentTextField> xField(
+ xFactory->createInstance("com.sun.star.text.TextField.User"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xMaster(
+ xFactory->createInstance("com.sun.star.text.FieldMaster.User"), uno::UNO_QUERY);
+ xMaster->setPropertyValue("Name", uno::Any(OUString("a_user_field")));
+ xField->attachTextFieldMaster(xMaster);
+ xField->getTextFieldMaster()->setPropertyValue("Content", uno::Any(OUString("42")));
+ uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xDocument->getText();
+ xText->insertTextContent(xText->createTextCursor(), xField, /*bAbsorb=*/false);
+ uno::Reference<beans::XPropertySet> xFieldProps(xField, uno::UNO_QUERY);
+
+ // When setting a tooltip on the field:
+ OUString aExpected("first line\nsecond line");
+ xFieldProps->setPropertyValue("Title", uno::Any(aExpected));
+
+ // Then make sure that the tooltip we read back matches the one previously specified:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - the property is of unexpected type or void: Title
+ // i.e. reading of the tooltip was broken.
+ CPPUNIT_ASSERT_EQUAL(aExpected, getProperty<OUString>(xFieldProps, "Title"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlInsert)
+{
+ // Given an empty document:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+
+ // When inserting a content control around one or more text portions:
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ // Set a custom property on the content control:
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ xContentControlProps->setPropertyValue("ShowingPlaceHolder", uno::Any(true));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // Then make sure that the text attribute is inserted:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex();
+ SwTextNode* pTextNode = pDoc->GetNodes()[nIndex]->GetTextNode();
+ SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL);
+ // Without the accompanying fix in place, this test would have failed, as the
+ // SwXContentControl::attach() implementation was missing.
+ CPPUNIT_ASSERT(pAttr);
+ // Also verify that the custom property was set:
+ auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ CPPUNIT_ASSERT(pContentControl->GetShowingPlaceHolder());
+
+ // Also verify that setText() and getText() works:
+ uno::Reference<text::XText> xContentControlText(xContentControl, uno::UNO_QUERY);
+ xContentControlText->setString("new");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: new
+ // - Actual :
+ // i.e. getString() always returned an empty string.
+ CPPUNIT_ASSERT_EQUAL(OUString("new"), xContentControlText->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwModelTestBase, testImageTooltip)
+{
+ // Given a document with an image and a hyperlink on it:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ uno::Reference<text::XTextContent> xImage(
+ xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xImage, /*bAbsorb=*/false);
+ uno::Reference<beans::XPropertySet> xImageProps(xImage, uno::UNO_QUERY);
+ xImageProps->setPropertyValue("HyperLinkURL", uno::Any(OUString("http://www.example.com")));
+
+ // When setting a tooltip on the image:
+ OUString aExpected("first line\nsecond line");
+ xImageProps->setPropertyValue("Tooltip", uno::Any(aExpected));
+
+ // Then make sure that the tooltip we read back matches the one previously specified:
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.beans.UnknownPropertyException
+ // i.e. reading/writing of the tooltip was broken.
+ CPPUNIT_ASSERT_EQUAL(aExpected, getProperty<OUString>(xImageProps, "Tooltip"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlTextPortionEnum)
+{
+ // Given a document with a content control around one or more text portions:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // When enumerating the text portions of the only paragraph in the document:
+ uno::Reference<css::text::XTextRange> xTextPortion = getRun(getParagraph(1), 1);
+
+ // Then make sure that the text portion type is correct + the content can be read:
+ auto aPortionType = getProperty<OUString>(xTextPortion, "TextPortionType");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: ContentControl
+ // - Actual : Text
+ // i.e. the content control text attribute was ignored.
+ CPPUNIT_ASSERT_EQUAL(OUString("ContentControl"), aPortionType);
+ xContentControl
+ = getProperty<uno::Reference<text::XTextContent>>(xTextPortion, "ContentControl");
+ uno::Reference<text::XTextRange> xContentControlRange(xContentControl, uno::UNO_QUERY);
+ xText = xContentControlRange->getText();
+ uno::Reference<container::XEnumerationAccess> xContentEnumAccess(xText, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xContentEnum = xContentEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xContent(xContentEnum->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("test"), xContent->getString());
+
+ // Also test the generated layout:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwFieldPortion"_ostr, "expand"_ostr, "");
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: PortionType::ContentControl
+ // - Actual : PortionType::Text
+ // i.e. SwContentControl generated a plain text portion, not a dedicated content control
+ // portion.
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwLinePortion"_ostr, "type"_ostr,
+ "PortionType::ContentControl");
+ assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwLinePortion"_ostr, "portion"_ostr,
+ "test*");
+
+ // Also test the doc model, make sure that there is a dummy character at the start and end, so
+ // the user can explicitly decide if they want to expand the content control or not:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ OUString aText = pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: ^Atest^A
+ // - Actual : ^Atest
+ // i.e. there was no dummy character at the end.
+ CPPUNIT_ASSERT_EQUAL(OUString("\x0001test\x0001"), aText);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlCheckbox)
+{
+ // Given an empty document:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+
+ // When inserting a checkbox content control:
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.beans.UnknownPropertyException
+ xContentControlProps->setPropertyValue("Checkbox", uno::Any(true));
+ xContentControlProps->setPropertyValue("Checked", uno::Any(true));
+ xContentControlProps->setPropertyValue("CheckedState", uno::Any(u"☒"_ustr));
+ xContentControlProps->setPropertyValue("UncheckedState", uno::Any(u"â˜"_ustr));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // Then make sure that the specified properties are set:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL);
+ auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ CPPUNIT_ASSERT(pContentControl->GetCheckbox());
+ CPPUNIT_ASSERT(pContentControl->GetChecked());
+ CPPUNIT_ASSERT_EQUAL(u"☒"_ustr, pContentControl->GetCheckedState());
+ CPPUNIT_ASSERT_EQUAL(u"â˜"_ustr, pContentControl->GetUncheckedState());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDropdown)
+{
+ // Given an empty document:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+
+ // When inserting a dropdown content control:
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ {
+ uno::Sequence<beans::PropertyValues> aListItems = {
+ {
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("red"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("R"))),
+ },
+ {
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("green"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("G"))),
+ },
+ {
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("blue"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("B"))),
+ },
+ };
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.beans.UnknownPropertyException
+ xContentControlProps->setPropertyValue("ListItems", uno::Any(aListItems));
+ }
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // Then make sure that the specified properties are set:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL);
+ auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ std::vector<SwContentControlListItem> aListItems = pContentControl->GetListItems();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aListItems.size());
+ CPPUNIT_ASSERT_EQUAL(OUString("red"), aListItems[0].m_aDisplayText);
+ CPPUNIT_ASSERT_EQUAL(OUString("R"), aListItems[0].m_aValue);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testInsertFileInContentControlException)
+{
+ // Given a document with a content control:
+ createSwDoc();
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // Reject inserting a document inside the content control:
+ xCursor->goLeft(1, false);
+ OUString aURL(createFileURL(u"tdf119081.odt"));
+ uno::Reference<document::XDocumentInsertable> xInsertable(xCursor, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_THROW(xInsertable->insertDocumentFromURL(aURL, {}), uno::RuntimeException);
+
+ // Accept inserting a document outside the content control:
+ xCursor->goRight(1, false);
+ xInsertable->insertDocumentFromURL(aURL, {});
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlPicture)
+{
+ // Given an empty document:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+
+ // When inserting a picture content control:
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ uno::Reference<beans::XPropertySet> xTextGraphic(
+ xMSF->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
+ xTextGraphic->setPropertyValue("AnchorType",
+ uno::Any(text::TextContentAnchorType_AS_CHARACTER));
+ uno::Reference<text::XTextContent> xTextContent(xTextGraphic, uno::UNO_QUERY);
+ xText->insertTextContent(xCursor, xTextContent, false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.beans.UnknownPropertyException
+ xContentControlProps->setPropertyValue("Picture", uno::Any(true));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // Then make sure that the specified properties are set:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL);
+ auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ CPPUNIT_ASSERT(pContentControl->GetPicture());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDate)
+{
+ // Given an empty document:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+
+ // When inserting a date content control:
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.beans.UnknownPropertyException
+ xContentControlProps->setPropertyValue("Date", uno::Any(true));
+ xContentControlProps->setPropertyValue("DateFormat", uno::Any(OUString("M/d/yyyy")));
+ xContentControlProps->setPropertyValue("DateLanguage", uno::Any(OUString("en-US")));
+ xContentControlProps->setPropertyValue("CurrentDate",
+ uno::Any(OUString("2022-05-25T00:00:00Z")));
+ xContentControlProps->setPropertyValue("PlaceholderDocPart",
+ uno::Any(OUString("DefaultPlaceholder_-1854013437")));
+ xContentControlProps->setPropertyValue(
+ "DataBindingPrefixMappings",
+ uno::Any(OUString("xmlns:ns0='http://schemas.microsoft.com/vsto/samples' ")));
+ xContentControlProps->setPropertyValue(
+ "DataBindingXpath",
+ uno::Any(OUString("/ns0:employees[1]/ns0:employee[1]/ns0:hireDate[1]")));
+ xContentControlProps->setPropertyValue(
+ "DataBindingStoreItemID", uno::Any(OUString("{241A8A02-7FFD-488D-8827-63FBE74E8BC9}")));
+ xContentControlProps->setPropertyValue("Color", uno::Any(OUString("008000")));
+ xContentControlProps->setPropertyValue("Alias", uno::Any(OUString("myalias")));
+ xContentControlProps->setPropertyValue("Tag", uno::Any(OUString("mytag")));
+ xContentControlProps->setPropertyValue("Id", uno::Any(static_cast<sal_Int32>(123)));
+ xContentControlProps->setPropertyValue("TabIndex", uno::Any(sal_uInt32(1)));
+ xContentControlProps->setPropertyValue("Lock", uno::Any(OUString("sdtContentLocked")));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // Then make sure that the specified properties are set:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL);
+ auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ CPPUNIT_ASSERT(pContentControl->GetDate());
+ CPPUNIT_ASSERT_EQUAL(OUString("M/d/yyyy"), pContentControl->GetDateFormat());
+ CPPUNIT_ASSERT_EQUAL(OUString("en-US"), pContentControl->GetDateLanguage());
+ CPPUNIT_ASSERT_EQUAL(OUString("2022-05-25T00:00:00Z"), pContentControl->GetCurrentDate());
+ CPPUNIT_ASSERT_EQUAL(OUString("DefaultPlaceholder_-1854013437"),
+ pContentControl->GetPlaceholderDocPart());
+ CPPUNIT_ASSERT_EQUAL(OUString("xmlns:ns0='http://schemas.microsoft.com/vsto/samples' "),
+ pContentControl->GetDataBindingPrefixMappings());
+ CPPUNIT_ASSERT_EQUAL(OUString("/ns0:employees[1]/ns0:employee[1]/ns0:hireDate[1]"),
+ pContentControl->GetDataBindingXpath());
+ CPPUNIT_ASSERT_EQUAL(OUString("{241A8A02-7FFD-488D-8827-63FBE74E8BC9}"),
+ pContentControl->GetDataBindingStoreItemID());
+ CPPUNIT_ASSERT_EQUAL(OUString("008000"), pContentControl->GetColor());
+ CPPUNIT_ASSERT_EQUAL(OUString("myalias"), pContentControl->GetAlias());
+ CPPUNIT_ASSERT_EQUAL(OUString("mytag"), pContentControl->GetTag());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(123), pContentControl->GetId());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(1), pContentControl->GetTabIndex());
+ CPPUNIT_ASSERT_EQUAL(OUString("sdtContentLocked"), pContentControl->GetLock());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlPlainText)
+{
+ // Given an empty document:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+
+ // When inserting a plain text content control around a text portion:
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ xContentControlProps->setPropertyValue("PlainText", uno::Any(true));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // Then make sure that the text attribute is inserted:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex();
+ SwTextNode* pTextNode = pDoc->GetNodes()[nIndex]->GetTextNode();
+ SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL);
+ CPPUNIT_ASSERT(pAttr);
+ // Also verify that the type if plain text:
+ auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ CPPUNIT_ASSERT(pContentControl->GetPlainText());
+
+ // Now check if the char index range 2-4 is extended to 0-6 when we apply formatting:
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ // Select "es" from "<dummy>test<dummy>".
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 2, /*bBasicCall=*/false);
+ pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/true, 2, /*bBasicCall=*/false);
+ SfxItemSetFixed<RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT> aSet(pWrtShell->GetAttrPool());
+ SvxWeightItem aItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
+ aSet.Put(aItem);
+ pWrtShell->SetAttrSet(aSet);
+ pAttr = pTextNode->GetTextAttrAt(2, RES_TXTATR_AUTOFMT);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 2
+ // i.e. the plain text content control now had 3 portions (<dummy>t<b>es</b>t<dummy>), instead
+ // of one (<b><dummy>test<dummy></b>).
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), pAttr->GetStart());
+ CPPUNIT_ASSERT(pAttr->End());
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(6), *pAttr->End());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlComboBox)
+{
+ // Given an empty document:
+ createSwDoc();
+ SwDoc* pDoc = getSwDoc();
+
+ // When inserting a combobox content control:
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ {
+ uno::Sequence<beans::PropertyValues> aListItems = {
+ {
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("red"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("R"))),
+ },
+ {
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("green"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("G"))),
+ },
+ {
+ comphelper::makePropertyValue("DisplayText", uno::Any(OUString("blue"))),
+ comphelper::makePropertyValue("Value", uno::Any(OUString("B"))),
+ },
+ };
+ xContentControlProps->setPropertyValue("ListItems", uno::Any(aListItems));
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.beans.UnknownPropertyException
+ xContentControlProps->setPropertyValue("ComboBox", uno::Any(true));
+ }
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+
+ // Then make sure that the specified properties are set:
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode();
+ SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL);
+ auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
+ auto& rFormatContentControl
+ = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr());
+ std::shared_ptr<SwContentControl> pContentControl = rFormatContentControl.GetContentControl();
+ std::vector<SwContentControlListItem> aListItems = pContentControl->GetListItems();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aListItems.size());
+ CPPUNIT_ASSERT_EQUAL(OUString("red"), aListItems[0].m_aDisplayText);
+ CPPUNIT_ASSERT_EQUAL(OUString("R"), aListItems[0].m_aValue);
+ CPPUNIT_ASSERT(pContentControl->GetComboBox());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControls)
+{
+ // Given an empty document:
+ createSwDoc();
+ auto pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ uno::Reference<container::XIndexAccess> xContentControls = pXTextDocument->getContentControls();
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), xContentControls->getCount());
+
+ // When inserting content controls:
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ // First tag1.
+ xText->insertString(xCursor, "test1", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->gotoEnd(/*bExpand=*/true);
+ {
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ xContentControlProps->setPropertyValue("Tag", uno::Any(OUString("tag1")));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+ }
+ xCursor->gotoStart(/*bExpand=*/false);
+ // Then tag2 before tag1.
+ xText->insertString(xCursor, "test2", /*bAbsorb=*/false);
+ xCursor->gotoStart(/*bExpand=*/false);
+ xCursor->goRight(5, /*bExpand=*/true);
+ {
+ uno::Reference<text::XTextContent> xContentControl(
+ xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY);
+ xContentControlProps->setPropertyValue("Tag", uno::Any(OUString("tag2")));
+ xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
+ }
+
+ // Then make sure that XContentControls contains the items in a correct order:
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xContentControls->getCount());
+ uno::Reference<beans::XPropertySet> xContentControl;
+ xContentControls->getByIndex(0) >>= xContentControl;
+ OUString aTag;
+ xContentControl->getPropertyValue("Tag") >>= aTag;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: tag2
+ // - Actual : tag1
+ // i.e. the order of the items was sorted by insert time, not by their doc model position.
+ CPPUNIT_ASSERT_EQUAL(OUString("tag2"), aTag);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testParagraphMarkerODFExport)
+{
+ // Given a document with a red numbering portion, from the paragraph marker's format:
+ createSwDoc("paragraph-marker.docx");
+
+ // When saving that as ODT + reload:
+ saveAndReload("writer8");
+
+ // Then make sure that it still has the correct color:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 00ff0000 (COL_LIGHTRED)
+ // - Actual : ffffffff (COL_AUTO)
+ // i.e. the custom "red" color was lost as RES_PARATR_LIST_AUTOFMT was not serialized to ODT.
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("00ff0000"),
+ getXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr, "color"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testParagraphMarkerFormattedRun)
+{
+ // Given a document with a bold run and non-bold paragraph marker:
+ createSwDoc("paragraph-marker-formatted-run.docx");
+
+ // When saving that as ODT + reload:
+ saveAndReload("writer8");
+
+ // Then make sure that the numbering portion is still non-bold, matching Word:
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: normal
+ // - Actual : bold
+ // i.e. the numbering portion was bold, while its weight should be normal.
+ CPPUNIT_ASSERT_EQUAL(OUString("normal"),
+ getXPath(pXmlDoc,
+ "//SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr,
+ "weight"_ostr));
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testFlySplit)
+{
+ // Given a document with a fly frame:
+ createSwDoc();
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ RndStdIds eAnchor = RndStdIds::FLY_AT_PARA;
+ aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize());
+ uno::Reference<text::XTextFramesSupplier> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame(xDocument->getTextFrames()->getByName("Frame1"),
+ uno::UNO_QUERY);
+ bool bIsSplitAllowed{};
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.beans.UnknownPropertyException
+ // - Unknown property: IsSplitAllowed
+ // i.e. the property was missing.
+ xFrame->getPropertyValue("IsSplitAllowed") >>= bIsSplitAllowed;
+ CPPUNIT_ASSERT(!bIsSplitAllowed);
+
+ // When marking it as IsSplitAllowed=true:
+ xFrame->setPropertyValue("IsSplitAllowed", uno::Any(true));
+
+ // Then make sure that IsSplitAllowed is true when asking back:
+ xFrame->getPropertyValue("IsSplitAllowed") >>= bIsSplitAllowed;
+ CPPUNIT_ASSERT(bIsSplitAllowed);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testConvertToTextFrame)
+{
+ // Given a document with 2 non-interesting frames, an inner frame and an outer frame:
+ createSwDoc("floattable-outer-nonsplit-inner.docx");
+
+ // When checking the anchor of the inner frame:
+ SwDoc* pDoc = getSwDoc();
+ const sw::FrameFormats<sw::SpzFrameFormat*>& rFrames = *pDoc->GetSpzFrameFormats();
+ sw::SpzFrameFormat* pFrame3 = rFrames.FindFrameFormatByName("Frame3");
+ SwNodeIndex aFrame3Anchor = pFrame3->GetAnchor().GetContentAnchor()->nNode;
+
+ // Then make sure it's anchored in the outer frame's last content node:
+ sw::SpzFrameFormat* pFrame4 = rFrames.FindFrameFormatByName("Frame4");
+ SwPaM aPaM(*pFrame4->GetContent().GetContentIdx()->GetNode().EndOfSectionNode());
+ aPaM.Move(fnMoveBackward, GoInContent);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: SwNodeIndex (node 27)
+ // - Actual : SwNodeIndex (node 49)
+ // i.e. Frame3 was anchored much later, in the body text, not in Frame4.
+ CPPUNIT_ASSERT_EQUAL(aPaM.GetPoint()->nNode, aFrame3Anchor);
+}
+
+namespace
+{
+/// This selection listener calls XTextRange::getString() on a selection change, which triggered
+/// a new selection change event by accident, resulting infinite recursion and crash
+struct SelectionChangeListener : public cppu::WeakImplHelper<view::XSelectionChangeListener>
+{
+public:
+ SelectionChangeListener();
+ // view::XSelectionChangeListener
+ void SAL_CALL selectionChanged(const lang::EventObject& rEvent) override;
+
+ // lang::XEventListener
+ void SAL_CALL disposing(const lang::EventObject& rSource) override;
+};
+}
+
+SelectionChangeListener::SelectionChangeListener() {}
+
+void SelectionChangeListener::selectionChanged(const lang::EventObject& rEvent)
+{
+ uno::Reference<view::XSelectionSupplier> xSelectionSupplier(rEvent.Source, uno::UNO_QUERY);
+ css::uno::Reference<css::container::XIndexAccess> xSelection(xSelectionSupplier->getSelection(),
+ css::uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSelection->getCount());
+ css::uno::Reference<css::text::XTextRange> xTextRange(xSelection->getByIndex(0),
+ css::uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT(xTextRange->getString().startsWith("test"));
+}
+
+void SelectionChangeListener::disposing(const lang::EventObject& /*rSource*/) {}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf155951)
+{
+ createSwDoc();
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextDocument->getText();
+ uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XSelectionSupplier> xController(xModel->getCurrentController(),
+ uno::UNO_QUERY);
+ xController->addSelectionChangeListener(new SelectionChangeListener());
+
+ // This crashed here because of infinite recursion
+ dispatchCommand(mxComponent, ".uno:WordLeftSel", {});
+
+ // this needs to wait for dispatching (trigger also a second selection change)
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testCollectFrameAtNodeWithLayout)
+{
+ // Given a document with a floating table on 2 pages, with a calculated layout:
+ createSwDoc("floattable-split.docx");
+ calcLayout();
+
+ // When saving to ODT:
+ save("writer8");
+
+ // Then make sure the output is valid and hasa 1 <draw:frame>:
+ // Without the accompanying fix in place, this test would have failed with:
+ // Error: uncompleted content model.
+ // i.e. the output was not valid, the second <draw:frame> has an empty <table:table> as a child
+ // element.
+ xmlDocUniquePtr pXmlDoc = parseExport("content.xml");
+ // Also make sure that we don't have multiple <draw:frame> elements in the first place.
+ assertXPath(pXmlDoc, "//draw:frame"_ostr, 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf149555)
+{
+ createSwDoc("tdf149555.docx");
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
+ xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(),
+ uno::UNO_QUERY);
+
+ xCursor->jumpToFirstPage();
+ OUString sPageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ uno::Reference<text::XText> xHeaderText = getProperty<uno::Reference<text::XText>>(
+ getStyles("PageStyles")->getByName(sPageStyleName), "HeaderText");
+ CPPUNIT_ASSERT_EQUAL(OUString("HEADER 1"), xHeaderText->getString());
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: HEADER 2
+ // - Actual: HEADER 1
+ xCursor->jumpToPage(2);
+ sPageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xHeaderText = getProperty<uno::Reference<text::XText>>(
+ getStyles("PageStyles")->getByName(sPageStyleName), "HeaderText");
+ CPPUNIT_ASSERT_EQUAL(OUString("HEADER 2"), xHeaderText->getString());
+
+ xCursor->jumpToPage(3);
+ sPageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xHeaderText = getProperty<uno::Reference<text::XText>>(
+ getStyles("PageStyles")->getByName(sPageStyleName), "HeaderText");
+ CPPUNIT_ASSERT_EQUAL(OUString("HEADER 2"), xHeaderText->getString());
+
+ xCursor->jumpToPage(4);
+ sPageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ xHeaderText = getProperty<uno::Reference<text::XText>>(
+ getStyles("PageStyles")->getByName(sPageStyleName), "HeaderText");
+ CPPUNIT_ASSERT_EQUAL(OUString("HEADER 2"), xHeaderText->getString());
+}
+
+// just care that it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf108272Crash)
+{
+ createSwDoc("tdf108272-1-minimal.docx");
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testWrapTextAtFlyStart)
+{
+ // Given a document with a fly frame:
+ createSwDoc();
+ SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+ SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+ RndStdIds eAnchor = RndStdIds::FLY_AT_PARA;
+ aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize());
+ uno::Reference<text::XTextFramesSupplier> xDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xFrame(xDocument->getTextFrames()->getByName("Frame1"),
+ uno::UNO_QUERY);
+ bool bWrapTextAtFlyStart{};
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.beans.UnknownPropertyException
+ // - Unknown property: WrapTextAtFlyStart
+ // i.e. the property was missing.
+ xFrame->getPropertyValue("WrapTextAtFlyStart") >>= bWrapTextAtFlyStart;
+ CPPUNIT_ASSERT(!bWrapTextAtFlyStart);
+
+ // When marking it as WrapTextAtFlyStart=true:
+ xFrame->setPropertyValue("WrapTextAtFlyStart", uno::Any(true));
+
+ // Then make sure that WrapTextAtFlyStart is true when asking back:
+ xFrame->getPropertyValue("WrapTextAtFlyStart") >>= bWrapTextAtFlyStart;
+ CPPUNIT_ASSERT(bWrapTextAtFlyStart);
+}
+
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..8171b318818f 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -13,7 +13,6 @@
#include <com/sun/star/i18n/WordType.hpp>
#include <comphelper/processfactory.hxx>
-#include <comphelper/random.hxx>
#include <i18nutil/transliteration.hxx>
#include <editeng/adjustitem.hxx>
#include <editeng/boxitem.hxx>
@@ -43,11 +42,9 @@
#include <sfx2/docfile.hxx>
#include <xmloff/odffields.hxx>
-#include <osl/process.h>
#include <breakit.hxx>
#include <doc.hxx>
-#include <IDocumentUndoRedo.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentStatistics.hxx>
@@ -59,7 +56,6 @@
#include <ndtxt.hxx>
#include <shellres.hxx>
#include <swscanner.hxx>
-#include <swmodule.hxx>
#include <swdll.hxx>
#include <swtypes.hxx>
#include <fmtftn.hxx>
@@ -81,7 +77,7 @@
#include <IDocumentMarkAccess.hxx>
#include <itabenum.hxx>
-typedef tools::SvRef<SwDocShell> SwDocShellRef;
+typedef rtl::Reference<SwDocShell> SwDocShellRef;
using namespace ::com::sun::star;
@@ -98,7 +94,6 @@ public:
virtual void setUp() override;
virtual void tearDown() override;
- void randomTest();
void testTableAutoFormats();
void testPageDescName();
void testFileNameFields();
@@ -137,7 +132,6 @@ public:
CPPUNIT_TEST_SUITE(SwDocTest);
CPPUNIT_TEST(testTransliterate);
- CPPUNIT_TEST(randomTest);
CPPUNIT_TEST(testTableAutoFormats);
CPPUNIT_TEST(testPageDescName);
CPPUNIT_TEST(testFileNameFields);
@@ -202,7 +196,7 @@ void SwDocTest::testFileNameFields()
{
//Here's a file name with some chars in it that will be %% encoded, when expanding
//SwFileNameFields we want to restore the original readable filename
- utl::TempFile aTempFile("demo [name]");
+ utl::TempFileNamed aTempFile(u"demo [name]");
aTempFile.EnableKillingFile();
INetURLObject aTempFileURL(aTempFile.GetURL());
@@ -287,15 +281,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);
}
@@ -310,20 +302,20 @@ static SwTextNode* getModelToViewTestDocument(SwDoc *pDoc)
pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
pDoc->getIDocumentContentOperations().InsertString(aPaM, "AAAAA BBBBB ");
- SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
- sal_Int32 nPos = aPaM.GetPoint()->nContent.GetIndex();
+ SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode();
+ sal_Int32 nPos = aPaM.GetPoint()->GetContentIndex();
pTextNode->InsertItem(aFootnote, nPos, nPos);
pDoc->getIDocumentContentOperations().InsertString(aPaM, " CCCCC ");
- nPos = aPaM.GetPoint()->nContent.GetIndex();
+ nPos = aPaM.GetPoint()->GetContentIndex();
pTextNode->InsertItem(aFootnote, nPos, nPos);
pDoc->getIDocumentContentOperations().InsertString(aPaM, " DDDDD");
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>((4*5) + 5 + 2), pTextNode->GetText().getLength());
//set start of selection to first B
- aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 6);
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 6);
aPaM.SetMark();
//set end of selection to last C
- aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 14);
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 14);
//set character attribute hidden on range
SvxCharHiddenItem aHidden(true, RES_CHRATR_HIDDEN);
pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aHidden );
@@ -335,10 +327,10 @@ static SwTextNode* getModelToViewTestDocument(SwDoc *pDoc)
CPPUNIT_ASSERT_MESSAGE("redlines should be visible", IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
//set start of selection to last A
- aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 4);
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 4);
aPaM.SetMark();
//set end of selection to second last B
- aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 9);
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 9);
pDoc->getIDocumentContentOperations().DeleteAndJoin(aPaM); //redline-aware deletion api
aPaM.DeleteMark();
@@ -362,7 +354,7 @@ static SwTextNode* getModelToViewTestDocument2(SwDoc *pDoc)
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] <<= vListEntries;
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] <<= sal_Int32(0);
pDoc->getIDocumentContentOperations().InsertString(aPaM, "CCCCC");
- SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode();
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(11),
pTextNode->GetText().getLength());
@@ -589,7 +581,7 @@ void SwDocTest::testSwScanner()
SwNodeIndex aIdx(m_pDoc->GetNodes().GetEndOfContent(), -1);
SwPaM aPaM(aIdx);
- SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode();
CPPUNIT_ASSERT_MESSAGE("Has Text Node", pTextNode);
@@ -616,10 +608,9 @@ void SwDocTest::testSwScanner()
//See https://www.libreoffice.org/bugzilla/show_bug.cgi?id=45271
{
- const sal_Unicode IDEOGRAPHICFULLSTOP_D[] = { 0x3002, 'D' };
+ static constexpr OUString IDEOGRAPHICFULLSTOP_D = u"\u3002D"_ustr;
- 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 );
@@ -627,35 +618,32 @@ void SwDocTest::testSwScanner()
m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aWestLangItem );
SwDocStat aDocStat;
- pTextNode = aPaM.GetNode().GetTextNode();
- pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(IDEOGRAPHICFULLSTOP_D));
+ pTextNode = aPaM.GetPointNode().GetTextNode();
+ 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 OUString 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? "_ustr;
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 );
@@ -663,8 +651,8 @@ void SwDocTest::testSwScanner()
m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aWestLangItem );
SwDocStat aDocStat;
- pTextNode = aPaM.GetNode().GetTextNode();
- pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(test));
+ pTextNode = aPaM.GetPointNode().GetTextNode();
+ 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 +664,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 OUString aShouldBeThree =
+ u"Should "
+ "\u2018be thr"
+ "ee\u2019"_ustr;
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
- m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(aShouldBeThree, SAL_N_ELEMENTS(aShouldBeThree)));
- pTextNode = aPaM.GetNode().GetTextNode();
- pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(aShouldBeThree));
+ m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aShouldBeThree);
+ pTextNode = aPaM.GetPointNode().GetTextNode();
+ 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 OUString aShouldBeFive =
+ u"french "
+ // << nbsp
+ "\u00AB\u00A0savoi"
+ // nnbsp
+ "r\u202fcalcu"
+ // idspace >>
+ "ler\u3000\u00BB"_ustr;
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
- m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(aShouldBeFive, SAL_N_ELEMENTS(aShouldBeFive)));
- pTextNode = aPaM.GetNode().GetTextNode();
+ m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aShouldBeFive);
+ pTextNode = aPaM.GetPointNode().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);
}
@@ -713,8 +698,8 @@ void SwDocTest::testSwScanner()
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Apple");
- pTextNode = aPaM.GetNode().GetTextNode();
- sal_Int32 nPos = aPaM.GetPoint()->nContent.GetIndex();
+ pTextNode = aPaM.GetPointNode().GetTextNode();
+ sal_Int32 nPos = aPaM.GetPoint()->GetContentIndex();
SwFormatFootnote aFootnote;
aFootnote.SetNumStr("banana");
SwTextAttr* pTA = pTextNode->InsertItem(aFootnote, nPos, nPos);
@@ -724,7 +709,7 @@ void SwDocTest::testSwScanner()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(1), aDocStat.nWord);
CPPUNIT_ASSERT_EQUAL_MESSAGE("footnote should be expanded", static_cast<sal_uLong>(11), aDocStat.nChar);
- const sal_Int32 nNextPos = aPaM.GetPoint()->nContent.GetIndex();
+ const sal_Int32 nNextPos = aPaM.GetPoint()->GetContentIndex();
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(nPos+1), nNextPos);
SwFormatRefMark aRef("refmark");
pTA = pTextNode->InsertItem(aRef, nNextPos, nNextPos);
@@ -746,7 +731,7 @@ void SwDocTest::testSwScanner()
m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, SwFormatField(aPostIt));
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Apple");
- pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode = aPaM.GetPointNode().GetTextNode();
aDocStat.Reset();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(1), aDocStat.nWord);
@@ -760,10 +745,10 @@ void SwDocTest::testSwScanner()
{
SwDocStat aDocStat;
- static constexpr OUStringLiteral aString = u"Lorem ipsum";
+ static constexpr OUString aString = u"Lorem ipsum"_ustr;
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aString);
- pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode = aPaM.GetPointNode().GetTextNode();
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(2), aDocStat.nWord);
@@ -774,10 +759,10 @@ void SwDocTest::testSwScanner()
//delete everything except the first word
aPaM.SetMark(); //set start of selection to current pos
- aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 5); //set end of selection to fifth char of current node
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 5); //set end of selection to fifth char of current node
m_pDoc->getIDocumentContentOperations().DeleteAndJoin(aPaM); //redline-aware deletion api
//"real underlying text should be the same"
- CPPUNIT_ASSERT_EQUAL(pTextNode->GetText(), OUString(aString));
+ CPPUNIT_ASSERT_EQUAL(aString, pTextNode->GetText());
aDocStat.Reset();
pTextNode->SetWordCountDirty(true);
@@ -803,7 +788,7 @@ void SwDocTest::testSwScanner()
SwNodes& rNds = m_pDoc->GetNodes();
CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(1), rTable.size());
- SwNodeIndex* pNodeIdx = rTable[0]->GetContentIdx();
+ const SwNodeIndex* pNodeIdx = rTable[0]->GetContentIdx();
CPPUNIT_ASSERT(pNodeIdx);
pTextNode = rNds[ pNodeIdx->GetIndex() + 1 ]->GetTextNode(); //first deleted txtnode
@@ -821,10 +806,10 @@ void SwDocTest::testSwScanner()
// redline *added* text though
m_pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete|RedlineFlags::ShowInsert);
aPaM.DeleteMark();
- aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 0);
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 0);
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "redline-new-text ");
aDocStat.Reset();
- pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode = aPaM.GetPointNode().GetTextNode();
pTextNode->SetWordCountDirty(true);
pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(2), aDocStat.nWord);
@@ -844,105 +829,104 @@ void SwDocTest::testSwScanner()
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', ' '));
- pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode = aPaM.GetPointNode().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 = aPaM.GetPointNode().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 = aPaM.GetPointNode().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 = aPaM.GetPointNode().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 = aPaM.GetPointNode().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 = aPaM.GetPointNode().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 = aPaM.GetPointNode().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 = aPaM.GetPointNode().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
//and endash as word separators for word-counting
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2013));
- pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode = aPaM.GetPointNode().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 = aPaM.GetPointNode().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 = aPaM.GetPointNode().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();
}
}
@@ -987,16 +971,16 @@ void SwDocTest::testGraphicAnchorDeletion()
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "graphic anchor>><<graphic anchor");
- SwNodeIndex nPara2 = aPaM.GetPoint()->nNode;
+ SwNodeIndex nPara2(aPaM.GetPoint()->GetNode());
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Paragraph 3");
- aPaM.GetPoint()->nNode = nPara2;
- aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>>"));
+ aPaM.GetPoint()->Assign(nPara2);
+ aPaM.GetPoint()->SetContent(RTL_CONSTASCII_LENGTH("graphic anchor>>"));
//Insert a graphic at X of >>X<< in paragraph 2
- SfxItemSet aFlySet(m_pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{});
+ SfxItemSet aFlySet(m_pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>);
SwFormatAnchor aAnchor(RndStdIds::FLY_AS_CHAR);
aAnchor.SetAnchor(aPaM.GetPoint());
aFlySet.Put(aAnchor);
@@ -1006,12 +990,12 @@ void SwDocTest::testGraphicAnchorDeletion()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be 1 graphic", static_cast<size_t>(1), m_pDoc->GetFlyCount(FLYCNTTYPE_GRF));
//Delete >X<
- aPaM.GetPoint()->nNode = nPara2;
- aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(),
+ aPaM.GetPoint()->Assign(nPara2);
+ aPaM.GetPoint()->SetContent(
RTL_CONSTASCII_LENGTH("graphic anchor>><")+1);
aPaM.SetMark();
- aPaM.GetPoint()->nNode = nPara2;
- aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>"));
+ aPaM.GetPoint()->Assign(nPara2);
+ aPaM.GetPoint()->SetContent(RTL_CONSTASCII_LENGTH("graphic anchor>"));
m_pDoc->getIDocumentContentOperations().DeleteRange(aPaM);
#ifdef DEBUG_AS_HTML
@@ -1031,178 +1015,6 @@ void SwDocTest::testGraphicAnchorDeletion()
//range to which its anchored, which is annoying.
}
-static int
-getRand(int modulus)
-{
- if (modulus <= 0)
- return 0;
- return comphelper::rng::uniform_int_distribution(0, modulus-1);
-}
-
-static OUString
-getRandString()
-{
- OUString aText("AAAAA BBBB CCC DD E \n");
- int s = getRand(aText.getLength());
- int j = getRand(aText.getLength() - s);
- OUString aRet(aText.copy(s, j));
- if (!getRand(5))
- aRet += "\n";
-// fprintf (stderr, "rand string '%s'\n", OUStringToOString(aRet, RTL_TEXTENCODING_UTF8).getStr());
- return aRet;
-}
-
-static SwPosition
-getRandomPosition(SwDoc *pDoc, int /* nOffset */)
-{
- const SwPosition aPos(pDoc->GetNodes().GetEndOfContent());
- size_t nNodes = aPos.nNode.GetNode().GetIndex() - aPos.nNode.GetNode().StartOfSectionIndex();
- // exclude body start/end node
- size_t n = comphelper::rng::uniform_size_distribution(1, nNodes - 1);
- SwPaM pam(aPos);
- for (sal_uLong i = 0; i < n; ++i)
- {
- pam.Move(fnMoveBackward, GoInNode);
- }
- SwTextNode *const pTextNode(pam.GetPoint()->nNode.GetNode().GetTextNode());
- assert(pTextNode);
- int n2 = comphelper::rng::uniform_int_distribution(0, pTextNode->Len());
- for (sal_Int32 i = 0; i < n2; ++i)
- {
- pam.Move(fnMoveBackward, GoInContent);
- }
- return *pam.GetPoint();
-}
-
-void SwDocTest::randomTest()
-{
- OUString aEnvKey("SAL_RAND_REPEATABLE");
- OUString aEnvValue("1");
- osl_setEnvironment(aEnvKey.pData, aEnvValue.pData);
-
- CPPUNIT_ASSERT_MESSAGE("SwDoc::IsRedlineOn()", !m_pDoc->getIDocumentRedlineAccess().IsRedlineOn());
- RedlineFlags modes[] = {
- RedlineFlags::On,
- RedlineFlags::ShowMask,
- RedlineFlags::NONE,
- RedlineFlags::On | RedlineFlags::ShowMask,
- RedlineFlags::On | RedlineFlags::Ignore,
- RedlineFlags::On | RedlineFlags::ShowInsert,
- RedlineFlags::On | RedlineFlags::ShowDelete
- };
- static const char *authors[] = {
- "Jim", "Bob", "JimBobina", "Helga", "Gertrude", "Spagna", "Hurtleweed"
- };
-
- for( size_t rlm = 0; rlm < SAL_N_ELEMENTS(modes); rlm++ )
- {
- m_pDoc->GetIDocumentUndoRedo().DoUndo(true);
- m_pDoc->ClearDoc();
-
- // setup redlining
- m_pDoc->getIDocumentRedlineAccess().SetRedlineFlags(modes[rlm]);
- SW_MOD()->SetRedlineAuthor(OUString::createFromAscii(authors[0]));
-
- for( int i = 0; i < 2000; i++ )
- {
- std::shared_ptr<SwUnoCursor> pCrs(
- m_pDoc->CreateUnoCursor(getRandomPosition(m_pDoc, i/20)));
-
- switch (getRand (i < 50 ? 3 : 6)) {
- // insert ops first
- case 0: {
- OUString const tmp(getRandString());
- sal_Int32 current(0);
- sal_Int32 nextBreak(tmp.indexOf('\n'));
- do
- {
- sal_Int32 const len((nextBreak == -1 ? tmp.getLength() : nextBreak - current));
- if (0 < len)
- {
- m_pDoc->getIDocumentContentOperations().InsertString(
- *pCrs, tmp.copy(current, len));
- }
- if (nextBreak != -1)
- {
- m_pDoc->getIDocumentContentOperations().SplitNode(*pCrs->GetPoint(), false);
- current = nextBreak + 1;
- nextBreak = tmp.indexOf('\n', current);
- }
- }
- while (nextBreak != -1);
- break;
- }
- case 1:
- break;
- case 2: { // switch author
- int a = getRand(SAL_N_ELEMENTS(authors));
- SW_MOD()->SetRedlineAuthor(OUString::createFromAscii(authors[a]));
- break;
- }
-
- // movement / deletion ops later
- case 3: // deletion
- pCrs->SetMark();
- switch (getRand(6)) {
- case 0:
- *pCrs->GetMark() = getRandomPosition(m_pDoc, 42);
- m_pDoc->getIDocumentContentOperations().DelFullPara(*pCrs);
- break;
- case 1:
- *pCrs->GetMark() = getRandomPosition(m_pDoc, 42);
- m_pDoc->getIDocumentContentOperations().DeleteRange(*pCrs);
- break;
- case 2:
- *pCrs->GetMark() = getRandomPosition(m_pDoc, 42);
- m_pDoc->getIDocumentContentOperations().DeleteAndJoin(*pCrs, !!getRand(1));
- break;
- case 3:
- default:
- OUString const tmp(getRandString());
- if (tmp.getLength())
- {
- m_pDoc->getIDocumentContentOperations().Overwrite(*pCrs, tmp);
- }
- break;
- }
- break;
- case 4: { // movement
- SwMoveFlags nFlags =
- getRand(1) // FIXME: puterb this more ?
- ? SwMoveFlags::DEFAULT
- : SwMoveFlags::CREATEUNDOOBJ |
- SwMoveFlags::REDLINES |
- SwMoveFlags::NO_DELFRMS;
- SwPosition aTo(getRandomPosition(m_pDoc, i/10));
- m_pDoc->getIDocumentContentOperations().MoveRange(*pCrs, aTo, nFlags);
- break;
- }
-
- case 5:
- break;
-
- // undo / redo ?
- default:
- break;
- }
- }
-
-// Debug / verify the produced document has real content
-#if 0
- OStringBuffer aBuffer("nodes-");
- aBuffer.append(sal_Int32(rlm));
- aBuffer.append(".xml");
-
- xmlTextWriterPtr writer;
- writer = xmlNewTextWriterFilename( aBuffer.makeStringAndClear().getStr(), 0 );
- xmlTextWriterStartDocument( writer, NULL, NULL, NULL );
- m_pDoc->dumpAsXml(writer);
- xmlTextWriterEndDocument( writer );
- xmlFreeTextWriter( writer );
-#endif
- }
-}
-
void SwDocTest::testTableAutoFormats()
{
SwGlobals::ensure();
@@ -1314,7 +1126,7 @@ void SwDocTest::testTableAutoFormats()
SfxBoolItem aStacked(0, true);
aBoxAF.SetStacked(aStacked);
//Set m_aMargin
- SvxMarginItem aSvxMarginItem(sal_Int16(4), sal_Int16(2), sal_Int16(3), sal_Int16(3), 0);
+ SvxMarginItem aSvxMarginItem(sal_Int16(4), sal_Int16(2), sal_Int16(3), sal_Int16(3), TypedWhichId<SvxMarginItem>(0));
aBoxAF.SetMargin(aSvxMarginItem);
//Set m_aLinebreak
SfxBoolItem aLBreak(0, true);
@@ -1323,7 +1135,7 @@ void SwDocTest::testTableAutoFormats()
SfxInt32Item aRAngle(sal_Int32(5));
aBoxAF.SetRotateAngle(aRAngle);
//Set m_aRotateMode
- SvxRotateModeItem aSvxRotateModeItem(SVX_ROTATE_MODE_CENTER, 0);
+ SvxRotateModeItem aSvxRotateModeItem(SVX_ROTATE_MODE_CENTER, TypedWhichId<SvxRotateModeItem>(0));
aBoxAF.SetRotateMode(aSvxRotateModeItem);
//Set m_sNumFormatString
OUString aNFString = "UnitTestFormat";
@@ -1334,17 +1146,9 @@ void SwDocTest::testTableAutoFormats()
//Set m_eNumFormatLanguage
LanguageType aNFLang( LANGUAGE_GERMAN );
aBoxAF.SetNumFormatLanguage(aNFLang);
- //Set m_aBreak
- SvxFormatBreakItem aBreak( SvxBreak::PageBefore, 0 );
- aTableAF.SetBreak(aBreak);
//Set m_aKeepWithNextPara
SvxFormatKeepItem aKWNPara( true, 0 );
aTableAF.SetKeepWithNextPara(aKWNPara);
- //Set m_aPageDesc
- SwFormatPageDesc aPDesc;
- uno::Any aPDAny( sal_uInt16(3) );
- aPDesc.PutValue( aPDAny, 0 );
- aTableAF.m_aPageDesc = aPDesc;
//Set m_aRepeatHeading
sal_uInt16 aRHeading = 3;
aTableAF.m_aRepeatHeading = aRHeading;
@@ -1476,12 +1280,8 @@ void SwDocTest::testTableAutoFormats()
CPPUNIT_ASSERT( bool( pLoadAF->GetBoxFormat(0).GetSysLanguage() == aSLang ) );
//Get m_eNumFormatLanguage
CPPUNIT_ASSERT( bool( pLoadAF->GetBoxFormat(0).GetNumFormatLanguage() == aNFLang ) );
- //Get m_aBreak
- CPPUNIT_ASSERT( bool( pLoadAF->GetBreak() == aBreak ) );
//Get m_aKeepWithNextPara
CPPUNIT_ASSERT( bool( pLoadAF->GetKeepWithNextPara() == aKWNPara ) );
- //Get m_aPageDesc
- CPPUNIT_ASSERT( bool( pLoadAF->m_aPageDesc == aPDesc ) );
//Get m_aRepeatHeading
CPPUNIT_ASSERT( bool( pLoadAF->m_aRepeatHeading == aRHeading ) );
//Get m_bLayoutSplit
@@ -1588,11 +1388,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());
}
@@ -1605,21 +1409,21 @@ void SwDocTest::testMarkMove()
SwPaM aPaM(aIdx);
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Paragraph 1");
aPaM.SetMark();
- aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex();
+ aPaM.GetMark()->nContent -= aPaM.GetMark()->GetContentIndex();
pMarksAccess->makeMark(aPaM, "Para1",
IDocumentMarkAccess::MarkType::BOOKMARK, sw::mark::InsertMode::New);
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Paragraph 2");
aPaM.SetMark();
- aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex();
+ aPaM.GetMark()->nContent -= aPaM.GetMark()->GetContentIndex();
pMarksAccess->makeMark(aPaM, "Para2",
IDocumentMarkAccess::MarkType::BOOKMARK, sw::mark::InsertMode::New);
m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Paragraph 3");
aPaM.SetMark();
- aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex();
+ aPaM.GetMark()->nContent -= aPaM.GetMark()->GetContentIndex();
pMarksAccess->makeMark(aPaM, "Para3",
IDocumentMarkAccess::MarkType::BOOKMARK, sw::mark::InsertMode::New);
}
@@ -1634,35 +1438,35 @@ void SwDocTest::testMarkMove()
::sw::mark::IMark* pBM2 = *pMarksAccess->findMark("Para2");
::sw::mark::IMark* pBM3 = *pMarksAccess->findMark("Para3");
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0) , pBM1->GetMarkStart().nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pBM1->GetMarkEnd().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0) , pBM1->GetMarkStart().GetContentIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pBM1->GetMarkEnd().GetContentIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM1->GetMarkStart().nNode.GetIndex(),
- pBM1->GetMarkEnd().nNode.GetIndex());
+ pBM1->GetMarkStart().GetNodeIndex(),
+ pBM1->GetMarkEnd().GetNodeIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0) , pBM2->GetMarkStart().nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pBM2->GetMarkEnd().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0) , pBM2->GetMarkStart().GetContentIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pBM2->GetMarkEnd().GetContentIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM2->GetMarkStart().nNode.GetIndex(),
- pBM2->GetMarkEnd().nNode.GetIndex());
+ pBM2->GetMarkStart().GetNodeIndex(),
+ pBM2->GetMarkEnd().GetNodeIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pBM3->GetMarkStart().nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(22), pBM3->GetMarkEnd().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pBM3->GetMarkStart().GetContentIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(22), pBM3->GetMarkEnd().GetContentIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM3->GetMarkStart().nNode.GetIndex(),
- pBM3->GetMarkEnd().nNode.GetIndex());
+ pBM3->GetMarkStart().GetNodeIndex(),
+ pBM3->GetMarkEnd().GetNodeIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM1->GetMarkStart().nNode.GetIndex()+1,
- pBM2->GetMarkStart().nNode.GetIndex());
+ pBM1->GetMarkStart().GetNodeIndex()+1,
+ pBM2->GetMarkStart().GetNodeIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM2->GetMarkStart().nNode.GetIndex(),
- pBM3->GetMarkStart().nNode.GetIndex());
+ pBM2->GetMarkStart().GetNodeIndex(),
+ pBM3->GetMarkStart().GetNodeIndex());
// cut some text
{
SwNodeIndex aIdx(m_pDoc->GetNodes().GetEndOfContent(), -1);
- SwPaM aPaM(aIdx, aIdx, -1);
+ SwPaM aPaM(aIdx, aIdx, SwNodeOffset(-1));
aPaM.GetPoint()->nContent += 5;
aPaM.GetMark()->nContent += 6;
m_pDoc->getIDocumentContentOperations().DeleteAndJoin(aPaM);
@@ -1671,30 +1475,30 @@ void SwDocTest::testMarkMove()
pBM2 = *pMarksAccess->findMark("Para2");
pBM3 = *pMarksAccess->findMark("Para3");
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pBM1->GetMarkStart().nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pBM1->GetMarkEnd().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pBM1->GetMarkStart().GetContentIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pBM1->GetMarkEnd().GetContentIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM1->GetMarkStart().nNode.GetIndex(),
- pBM1->GetMarkEnd().nNode.GetIndex());
+ pBM1->GetMarkStart().GetNodeIndex(),
+ pBM1->GetMarkEnd().GetNodeIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pBM2->GetMarkStart().nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(12), pBM2->GetMarkEnd().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pBM2->GetMarkStart().GetContentIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(12), pBM2->GetMarkEnd().GetContentIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM2->GetMarkStart().nNode.GetIndex(),
- pBM2->GetMarkEnd().nNode.GetIndex());
+ pBM2->GetMarkStart().GetNodeIndex(),
+ pBM2->GetMarkEnd().GetNodeIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(12), pBM3->GetMarkStart().nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(23), pBM3->GetMarkEnd().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(12), pBM3->GetMarkStart().GetContentIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(23), pBM3->GetMarkEnd().GetContentIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM3->GetMarkStart().nNode.GetIndex(),
- pBM3->GetMarkEnd().nNode.GetIndex());
+ pBM3->GetMarkStart().GetNodeIndex(),
+ pBM3->GetMarkEnd().GetNodeIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM1->GetMarkStart().nNode.GetIndex(),
- pBM2->GetMarkStart().nNode.GetIndex());
+ pBM1->GetMarkStart().GetNodeIndex(),
+ pBM2->GetMarkStart().GetNodeIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM2->GetMarkStart().nNode.GetIndex(),
- pBM3->GetMarkStart().nNode.GetIndex());
+ pBM2->GetMarkStart().GetNodeIndex(),
+ pBM3->GetMarkStart().GetNodeIndex());
// split the paragraph
{
@@ -1707,30 +1511,30 @@ void SwDocTest::testMarkMove()
pBM2 = *pMarksAccess->findMark("Para2");
pBM3 = *pMarksAccess->findMark("Para3");
- CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pBM1->GetMarkStart().nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pBM1->GetMarkEnd().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pBM1->GetMarkStart().GetContentIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pBM1->GetMarkEnd().GetContentIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM1->GetMarkStart().nNode.GetIndex(),
- pBM1->GetMarkEnd().nNode.GetIndex());
+ pBM1->GetMarkStart().GetNodeIndex(),
+ pBM1->GetMarkEnd().GetNodeIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pBM2->GetMarkStart().nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pBM2->GetMarkEnd().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pBM2->GetMarkStart().GetContentIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pBM2->GetMarkEnd().GetContentIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM2->GetMarkStart().nNode.GetIndex()+1,
- pBM2->GetMarkEnd().nNode.GetIndex());
+ pBM2->GetMarkStart().GetNodeIndex()+1,
+ pBM2->GetMarkEnd().GetNodeIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pBM3->GetMarkStart().nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(15), pBM3->GetMarkEnd().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pBM3->GetMarkStart().GetContentIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(15), pBM3->GetMarkEnd().GetContentIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM3->GetMarkStart().nNode.GetIndex(),
- pBM3->GetMarkEnd().nNode.GetIndex());
+ pBM3->GetMarkStart().GetNodeIndex(),
+ pBM3->GetMarkEnd().GetNodeIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM1->GetMarkStart().nNode.GetIndex(),
- pBM2->GetMarkStart().nNode.GetIndex());
+ pBM1->GetMarkStart().GetNodeIndex(),
+ pBM2->GetMarkStart().GetNodeIndex());
CPPUNIT_ASSERT_EQUAL(
- pBM2->GetMarkEnd().nNode.GetIndex(),
- pBM3->GetMarkEnd().nNode.GetIndex());
+ pBM2->GetMarkEnd().GetNodeIndex(),
+ pBM3->GetMarkEnd().GetNodeIndex());
}
namespace
@@ -1744,24 +1548,20 @@ namespace
{ return GetPrevInRing(); }
bool lonely() const
{ return unique(); }
-#if 0
- void debug()
- {
- SAL_DEBUG("TestRing at: " << this << " prev: " << GetPrev() << " next: " << GetNext());
- }
-#endif
};
}
void SwDocTest::testIntrusiveRing()
{
TestRing aRing1, aRing2, aRing3, aRing4, aRing5;
- std::vector<TestRing*> vRings;
- vRings.push_back(&aRing1);
- vRings.push_back(&aRing2);
- vRings.push_back(&aRing3);
- vRings.push_back(&aRing4);
- vRings.push_back(&aRing5);
+ std::vector<TestRing*> vRings
+ {
+ &aRing1,
+ &aRing2,
+ &aRing3,
+ &aRing4,
+ &aRing5
+ };
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aRing1.GetRingContainer().size());
CPPUNIT_ASSERT(aRing1.lonely());
CPPUNIT_ASSERT(aRing2.lonely());
@@ -1793,7 +1593,6 @@ void SwDocTest::testIntrusiveRing()
{
TestRing* pRing = &r;
CPPUNIT_ASSERT(pRing);
- //pRing->debug();
}
const TestRing* pConstRing = &aRing1;
for(const TestRing& r: pConstRing->GetRingContainer()) // this should fail without r being const
@@ -2019,7 +1818,7 @@ void SwDocTest::test64kPageDescs()
CPPUNIT_ASSERT_EQUAL( OUString("Page65535"), rDesc.GetName() );
SwPageDesc aDesc( rDesc );
- const OUString aChanged("Changed01");
+ static constexpr OUString aChanged(u"Changed01"_ustr);
aDesc.SetName( aChanged );
m_pDoc->ChgPageDesc( nPageDescCount, aDesc );
@@ -2053,35 +1852,35 @@ void SwDocTest::testTdf92308()
void SwDocTest::testTableCellComparison()
{
- CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellsByColFirst("A1", "Z1") );
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByColFirst("Z1", "A1") );
- CPPUNIT_ASSERT_EQUAL( 0, sw_CompareCellsByColFirst("A1", "A1") );
-
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByColFirst("A2", "A1") );
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByColFirst("Z3", "A2") );
- CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellsByColFirst("A3", "Z1") );
-
- CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellsByRowFirst("A1", "Z1") );
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByRowFirst("Z1", "A1") );
- CPPUNIT_ASSERT_EQUAL( 0, sw_CompareCellsByRowFirst("A1", "A1") );
-
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByRowFirst("A2", "A1") );
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByRowFirst("Z3", "A2") );
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByRowFirst("A3", "Z1") );
-
- CPPUNIT_ASSERT_EQUAL( 0, sw_CompareCellRanges("A1", "A1", "A1", "A1", true) );
- CPPUNIT_ASSERT_EQUAL( 0, sw_CompareCellRanges("A1", "Z1", "A1", "Z1", true) );
- CPPUNIT_ASSERT_EQUAL( 0, sw_CompareCellRanges("A1", "Z1", "A1", "Z1", false) );
-
- CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellRanges("A1", "Z1", "B1", "Z1", true) );
- CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellRanges("A1", "Z1", "A2", "Z2", false) );
- CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellRanges("A1", "Z1", "A2", "Z2", true) );
- CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellRanges("A1", "Z1", "A6", "Z2", true) );
-
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellRanges("B1", "Z1", "A1", "Z1", true) );
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellRanges("A2", "Z2", "A1", "Z1", false) );
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellRanges("A2", "Z2", "A1", "Z1", true) );
- CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellRanges("A6", "Z2", "A1", "Z1", true) );
+ CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellsByColFirst(u"A1", u"Z1") );
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByColFirst(u"Z1", u"A1") );
+ CPPUNIT_ASSERT_EQUAL( 0, sw_CompareCellsByColFirst(u"A1", u"A1") );
+
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByColFirst(u"A2", u"A1") );
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByColFirst(u"Z3", u"A2") );
+ CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellsByColFirst(u"A3", u"Z1") );
+
+ CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellsByRowFirst(u"A1", u"Z1") );
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByRowFirst(u"Z1", u"A1") );
+ CPPUNIT_ASSERT_EQUAL( 0, sw_CompareCellsByRowFirst(u"A1", u"A1") );
+
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByRowFirst(u"A2", u"A1") );
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByRowFirst(u"Z3", u"A2") );
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellsByRowFirst(u"A3", u"Z1") );
+
+ CPPUNIT_ASSERT_EQUAL( 0, sw_CompareCellRanges(u"A1", u"A1", u"A1", u"A1", true) );
+ CPPUNIT_ASSERT_EQUAL( 0, sw_CompareCellRanges(u"A1", u"Z1", u"A1", u"Z1", true) );
+ CPPUNIT_ASSERT_EQUAL( 0, sw_CompareCellRanges(u"A1", u"Z1", u"A1", u"Z1", false) );
+
+ CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellRanges(u"A1", u"Z1", u"B1", u"Z1", true) );
+ CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellRanges(u"A1", u"Z1", u"A2", u"Z2", false) );
+ CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellRanges(u"A1", u"Z1", u"A2", u"Z2", true) );
+ CPPUNIT_ASSERT_EQUAL( -1, sw_CompareCellRanges(u"A1", u"Z1", u"A6", u"Z2", true) );
+
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellRanges(u"B1", u"Z1", u"A1", u"Z1", true) );
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellRanges(u"A2", u"Z2", u"A1", u"Z1", false) );
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellRanges(u"A2", u"Z2", u"A1", u"Z1", true) );
+ CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellRanges(u"A6", u"Z2", u"A1", u"Z1", true) );
OUString rCell1("A1");
OUString rCell2("C5");
diff --git a/sw/qa/core/view/data/update-ole-object-previews.odt b/sw/qa/core/view/data/update-ole-object-previews.odt
new file mode 100644
index 000000000000..e6004afcb8ad
--- /dev/null
+++ b/sw/qa/core/view/data/update-ole-object-previews.odt
Binary files differ
diff --git a/sw/qa/core/view/view.cxx b/sw/qa/core/view/view.cxx
new file mode 100644
index 000000000000..576095c7f4cc
--- /dev/null
+++ b/sw/qa/core/view/view.cxx
@@ -0,0 +1,72 @@
+/* -*- 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 <svtools/embedhlp.hxx>
+#include <vcl/graph.hxx>
+
+#include <doc.hxx>
+#include <docsh.hxx>
+#include <fmtcntnt.hxx>
+#include <frameformats.hxx>
+#include <frmfmt.hxx>
+#include <ndarr.hxx>
+#include <ndindex.hxx>
+#include <ndole.hxx>
+#include <node.hxx>
+#include <nodeoffset.hxx>
+#include <wrtsh.hxx>
+
+namespace
+{
+/// Covers sw/source/core/view/ fixes.
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/core/view/data/")
+ {
+ }
+};
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testUpdateOleObjectPreviews)
+{
+ // Given a document with two embedded objects, both with broken native data:
+ createSwDoc("update-ole-object-previews.odt");
+ SwDoc* pDoc = getSwDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // When updating the previews of those embedded objects (right after document load, before
+ // painting the OLE objects):
+ pWrtShell->UpdateOleObjectPreviews();
+
+ // Then make sure that the working preview of those objects are not lost:
+ const auto pFormats = pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT(pFormats);
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), pFormats->size());
+ for (auto pFormat : *pFormats)
+ {
+ const SwNodeIndex* pNodeIndex = pFormat->GetContent().GetContentIdx();
+ CPPUNIT_ASSERT(pNodeIndex);
+ SwNode* pNode = pDoc->GetNodes()[pNodeIndex->GetIndex() + 1];
+ SwOLENode* pOleNode = pNode->GetOLENode();
+ CPPUNIT_ASSERT(pOleNode);
+ SwOLEObj& rOleObj = pOleNode->GetOLEObj();
+ svt::EmbeddedObjectRef& rObject = rOleObj.GetObject();
+ // Without the accompanying fix in place, this test would have failed, the update broke the
+ // preview of the second embedded object.
+ CPPUNIT_ASSERT(!rObject.GetGraphic()->IsNone());
+ }
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */