diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:04 +0000 |
commit | eb358d77291eba677141bab113dc27d7aabb0f3e (patch) | |
tree | 2e96f3b5d0c79beaeb536bbf05c3b8564846e65f /sw/qa | |
parent | Adding debian version 4:24.2.1-4. (diff) | |
download | libreoffice-eb358d77291eba677141bab113dc27d7aabb0f3e.tar.xz libreoffice-eb358d77291eba677141bab113dc27d7aabb0f3e.zip |
Merging upstream version 4:24.2.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/qa')
31 files changed, 1116 insertions, 53 deletions
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 Binary files differnew file mode 100644 index 0000000000..d6950a6c8e --- /dev/null +++ b/sw/qa/core/layout/data/floattable-wrapped-by-table-nested.docx diff --git a/sw/qa/core/layout/tabfrm.cxx b/sw/qa/core/layout/tabfrm.cxx index 61b1a25109..e0d099c771 100644 --- a/sw/qa/core/layout/tabfrm.cxx +++ b/sw/qa/core/layout/tabfrm.cxx @@ -221,6 +221,20 @@ CPPUNIT_TEST_FIXTURE(Test, testInlineTableThenSplitFly) // 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()); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 381fe0dab3..3e52b12a36 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -78,6 +78,33 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testTdf119081) 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) { createSwDoc(); diff --git a/sw/qa/extras/accessibility/dialogs.cxx b/sw/qa/extras/accessibility/dialogs.cxx index 091e6729c9..665e76c9bc 100644 --- a/sw/qa/extras/accessibility/dialogs.cxx +++ b/sw/qa/extras/accessibility/dialogs.cxx @@ -89,6 +89,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, TestSpecialCharactersDialogFocu CPPUNIT_ASSERT_EQUAL(u"<PARAGRAPH>!</PARAGRAPH>"_ustr, collectText()); } +#if !defined(_WIN32) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestHyperlinkDialog) { load(u"private:factory/swriter"_ustr); @@ -112,6 +113,7 @@ CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestHyperlinkDialog) CPPUNIT_ASSERT_EQUAL(rtl::OUString("<PARAGRAPH>https://libreoffice.org/</PARAGRAPH>"), collectText()); } +#endif //defined(_WIN32) CPPUNIT_TEST_FIXTURE(test::SwAccessibleTestBase, BasicTestBookmarkDialog) { diff --git a/sw/qa/extras/fodfexport/fodfexport.cxx b/sw/qa/extras/fodfexport/fodfexport.cxx index 2cf5bf42a7..840b5d47ba 100644 --- a/sw/qa/extras/fodfexport/fodfexport.cxx +++ b/sw/qa/extras/fodfexport/fodfexport.cxx @@ -20,34 +20,38 @@ public: } }; -DECLARE_FODFEXPORT_TEST(testTdf113696, "tdf113696.odt") +CPPUNIT_TEST_FIXTURE(Test, testTdf113696) { + loadFromFile(u"tdf113696.odt"); + CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); + + save("OpenDocument Text Flat XML"); // Test that an image which is written in svm format (image/x-vclgraphic) // is accompanied by a png fallback graphic. - if (xmlDocUniquePtr pXmlDoc = parseExportedFile()) - { - assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/" - "draw:image[@draw:mime-type='image/x-vclgraphic']"_ostr); - assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/" - "draw:image[@draw:mime-type='image/png']"_ostr); - } + xmlDocUniquePtr pXmlDoc = parseExportedFile(); + assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/" + "draw:image[@draw:mime-type='image/x-vclgraphic']"_ostr); + assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/" + "draw:image[@draw:mime-type='image/png']"_ostr); } -DECLARE_FODFEXPORT_TEST(testTdf113696WriterImage, "tdf113696-writerimage.odt") +CPPUNIT_TEST_FIXTURE(Test, testTdf113696WriterImage) { + loadFromFile(u"tdf113696-writerimage.odt"); + CPPUNIT_ASSERT_EQUAL(1, getShapes()); CPPUNIT_ASSERT_EQUAL(1, getPages()); + + save("OpenDocument Text Flat XML"); // Same as testTdf113696, but with a writer image instead of a draw image // (they use different code paths). - if (xmlDocUniquePtr pXmlDoc = parseExportedFile()) - { - assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/" - "draw:image[@draw:mime-type='image/x-vclgraphic']"_ostr); - assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/" - "draw:image[@draw:mime-type='image/png']"_ostr); - } + xmlDocUniquePtr pXmlDoc = parseExportedFile(); + assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/" + "draw:image[@draw:mime-type='image/x-vclgraphic']"_ostr); + assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/" + "draw:image[@draw:mime-type='image/png']"_ostr); } DECLARE_FODFEXPORT_TEST(testSvgImageRoundtrip, "SvgImageTest.fodt") diff --git a/sw/qa/extras/htmlexport/data/char_border_and_font_color.fodt b/sw/qa/extras/htmlexport/data/char_border_and_font_color.fodt new file mode 100644 index 0000000000..bda2ec6313 --- /dev/null +++ b/sw/qa/extras/htmlexport/data/char_border_and_font_color.fodt @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + <office:automatic-styles> + <style:style style:name="P1" style:family="paragraph"> + <style:text-properties fo:color="#000000" loext:border="none"/> + </style:style> + </office:automatic-styles> + <office:body> + <office:text> + <text:p text:style-name="P1">foo</text:p> + </office:text> + </office:body> +</office:document>
\ No newline at end of file diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index 1bd883be11..de2e9da4c6 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -3032,6 +3032,27 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_NoBrClearForImageWrap) 0); } +CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_Tdf160017_spanClosingOrder) +{ + // Given a document with a paragraph having explicit font color and character border properties: + createSwDoc("char_border_and_font_color.fodt"); + // When exporting to reqif: + ExportToReqif(); + // Without the fix, this would fail, because there was an extra closing </reqif-xhtml:span> + WrapReqifFromTempFile(); +} + +CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testHTML_Tdf160017_spanClosingOrder) +{ + // Given a document with a paragraph having explicit font color and character border properties: + createSwDoc("char_border_and_font_color.fodt"); + // When exporting to HTML: + ExportToHTML(); + // Parse it as XML (strict!) + // Without the fix, this would fail, because span and font elements closed in wrong order + CPPUNIT_ASSERT(parseXml(maTempFile)); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/layout/data/largeTopMarginAndHiddenFirstSection.fodt b/sw/qa/extras/layout/data/largeTopMarginAndHiddenFirstSection.fodt new file mode 100644 index 0000000000..fbefc5c480 --- /dev/null +++ b/sw/qa/extras/layout/data/largeTopMarginAndHiddenFirstSection.fodt @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + <office:styles> + <style:style style:name="Standard" style:family="paragraph" style:class="text"> + <style:paragraph-properties fo:margin-top="1in" fo:margin-bottom="0" style:contextual-spacing="false" fo:line-height="12pt"/> + </style:style> + </office:styles> + <office:body> + <office:text> + <text:section text:name="Hidden" text:display="none"/> + <text:section text:name="Shown"/> + </office:text> + </office:body> +</office:document>
\ No newline at end of file diff --git a/sw/qa/extras/layout/data/pageBreakInHiddenSection.fodt b/sw/qa/extras/layout/data/pageBreakInHiddenSection.fodt new file mode 100644 index 0000000000..5fae6a4917 --- /dev/null +++ b/sw/qa/extras/layout/data/pageBreakInHiddenSection.fodt @@ -0,0 +1,90 @@ +<?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" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + <office:automatic-styles> + <style:style style:name="P1" style:family="paragraph" style:master-page-name="Landscape"> + <style:paragraph-properties style:page-number="1"/> + </style:style> + <style:style style:name="P2" style:family="paragraph" style:master-page-name="Landscape"> + <style:paragraph-properties style:page-number="1"/> + <style:text-properties text:display="none"/> + </style:style> + </office:automatic-styles> + <office:body> + <office:text> + <text:p>First line</text:p> + <text:section text:name="Hidden" text:display="none"> + <text:p text:style-name="P1"/> + </text:section> + <text:section text:name="Shown"> + <text:p>Before break (still first page)</text:p> + </text:section> + <text:section text:name="HiddenText"> + <text:p text:style-name="P2"/> + </text:section> + <text:p>After break</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: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: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:p/> + <text:p/> + <text:p/> + <text:p/> + <text:p/> + <text:p/> + <text:p/> + <text:p>Should be together with next</text:p> + <text:section text:name="Hidden2" text:display="none"> + <text:p text:style-name="P2"/> + </text:section> + <text:p>Should be together with previous</text:p> + </office:text> + </office:body> +</office:document>
\ No newline at end of file diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx index 9c46d8395a..a074a35dc6 100644 --- a/sw/qa/extras/layout/layout3.cxx +++ b/sw/qa/extras/layout/layout3.cxx @@ -94,15 +94,25 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119875) { createSwDoc("tdf119875.odt"); xmlDocUniquePtr pXmlDoc = parseLayoutDump(); - sal_Int32 nFirstTop - = getXPath(pXmlDoc, "/root/page[2]/body/section[1]/infos/bounds"_ostr, "top"_ostr) - .toInt32(); - sal_Int32 nSecondTop - = getXPath(pXmlDoc, "/root/page[2]/body/section[2]/infos/bounds"_ostr, "top"_ostr) - .toInt32(); - // The first section had the same top value as the second one, so they - // overlapped. - CPPUNIT_ASSERT_LESS(nSecondTop, nFirstTop); + + assertXPath(pXmlDoc, "//page[2]/body/section[1]"_ostr, "formatName"_ostr, u"S10"_ustr); + assertXPath(pXmlDoc, "//page[2]/body/section[2]"_ostr, "formatName"_ostr, u"S11"_ustr); + assertXPath(pXmlDoc, "//page[2]/body/section[3]"_ostr, "formatName"_ostr, u"S13"_ustr); + assertXPath(pXmlDoc, "//page[2]/body/section[4]"_ostr, "formatName"_ostr, u"S14"_ustr); + // Sections "S10" and "S13" are hidden -> their frames are zero-height + assertXPath(pXmlDoc, "//page[2]/body/section[1]/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); + assertXPath(pXmlDoc, "//page[2]/body/section[3]/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); + + OUString S10Top = getXPath(pXmlDoc, "//page[2]/body/section[1]/infos/bounds"_ostr, "top"_ostr); + OUString S11Top = getXPath(pXmlDoc, "//page[2]/body/section[2]/infos/bounds"_ostr, "top"_ostr); + OUString S13Top = getXPath(pXmlDoc, "//page[2]/body/section[3]/infos/bounds"_ostr, "top"_ostr); + OUString S14Top = getXPath(pXmlDoc, "//page[2]/body/section[4]/infos/bounds"_ostr, "top"_ostr); + + CPPUNIT_ASSERT_EQUAL(S10Top, S11Top); + CPPUNIT_ASSERT_EQUAL(S13Top, S14Top); + + // Section "S11" had the same top value as section "S14", so they overlapped. + CPPUNIT_ASSERT_LESS(S14Top.toInt32(), S11Top.toInt32()); } CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf137523) @@ -2303,6 +2313,46 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159259) CPPUNIT_ASSERT_EQUAL(paraHeight, flyHeight); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testLargeTopParaMarginAfterHiddenSection) +{ + // Given a large top margin in Standard paragraph style, and the first section hidden + createSwDoc("largeTopMarginAndHiddenFirstSection.fodt"); + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + // Make sure there is only one page and two sections, first hidden (zero-height) + assertXPath(pXmlDoc, "//page"_ostr, 1); + assertXPath(pXmlDoc, "//page/body/section"_ostr, 2); + assertXPath(pXmlDoc, "//page/body/section[1]/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); + // Check that the top margin (1 in = 1440 twip) is added to line height (12 pt = 240 twip) + assertXPath(pXmlDoc, "//page/body/section[2]/infos/bounds"_ostr, "height"_ostr, u"1680"_ustr); +} + +CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testPageBreakInHiddenSection) +{ + // Given a paragraph with page-break-before with page style and page number + createSwDoc("pageBreakInHiddenSection.fodt"); + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + assertXPath(pXmlDoc, "//page"_ostr, 4); + assertXPath(pXmlDoc, "//section"_ostr, 4); + assertXPath(pXmlDoc, "//page[1]/body/txt"_ostr, 1); + // The page break inside the hidden section is ignored (otherwise, there would be one section + // on the first page) + assertXPath(pXmlDoc, "//page[1]/body/section"_ostr, 2); + // The first section is hidden + assertXPath(pXmlDoc, "//page[1]/body/section[1]/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); + + // Page 2 is empty even page (generated by the next page's section with page-break-before) + assertXPath(pXmlDoc, "//page[2]/body"_ostr, 0); + + // The section on page 3 is not hidden, only text in it is, therefore its page break works + assertXPath(pXmlDoc, "//page[3]/body/section"_ostr, 1); + assertXPath(pXmlDoc, "//page[3]/body/section/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); + + // The section on page 4 is hidden, thus page break in it is ignored (no further pages, where + // the section would be moved to otherwise) + assertXPath(pXmlDoc, "//page[4]/body/section"_ostr, 1); + assertXPath(pXmlDoc, "//page[4]/body/section/infos/bounds"_ostr, "height"_ostr, u"0"_ustr); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/odfexport/data/bookmark_order.fodt b/sw/qa/extras/odfexport/data/bookmark_order.fodt new file mode 100644 index 0000000000..c7eac58758 --- /dev/null +++ b/sw/qa/extras/odfexport/data/bookmark_order.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:bookmark-start text:name="bookmark1"/>foo<text:bookmark-end text:name="bookmark1"/><text:bookmark text:name="bookmark2"/><text:bookmark-start text:name="bookmark3"/>bar<text:bookmark-end text:name="bookmark3"/></text:p> + </office:text> + </office:body> +</office:document>
\ No newline at end of file diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index 37e744e9c8..4983608290 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -1247,6 +1247,102 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159382) } } +CPPUNIT_TEST_FIXTURE(Test, testTdf159438) +{ + // Given a text with bookmarks, where an end of one bookmark is the position of another, + // and the start of a third + loadAndReload("bookmark_order.fodt"); + auto xPara = getParagraph(1); + + // Check that the order of runs is correct (bookmarks don't overlap) + + { + auto run = getRun(xPara, 1); + CPPUNIT_ASSERT_EQUAL(u"Bookmark"_ustr, getProperty<OUString>(run, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(run, "IsStart")); + CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(run, "IsCollapsed")); + auto named = getProperty<uno::Reference<container::XNamed>>(run, "Bookmark"); + CPPUNIT_ASSERT_EQUAL(u"bookmark1"_ustr, named->getName()); + } + + { + auto run = getRun(xPara, 2); + CPPUNIT_ASSERT_EQUAL(u"Text"_ustr, getProperty<OUString>(run, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(u"foo"_ustr, run->getString()); + } + + { + auto run = getRun(xPara, 3); + CPPUNIT_ASSERT_EQUAL(u"Bookmark"_ustr, getProperty<OUString>(run, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(run, "IsStart")); + CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(run, "IsCollapsed")); + auto named = getProperty<uno::Reference<container::XNamed>>(run, "Bookmark"); + CPPUNIT_ASSERT_EQUAL(u"bookmark1"_ustr, named->getName()); + } + + { + auto run = getRun(xPara, 4); + CPPUNIT_ASSERT_EQUAL(u"Bookmark"_ustr, getProperty<OUString>(run, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(run, "IsStart")); + CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(run, "IsCollapsed")); + auto named = getProperty<uno::Reference<container::XNamed>>(run, "Bookmark"); + CPPUNIT_ASSERT_EQUAL(u"bookmark2"_ustr, named->getName()); + } + + { + auto run = getRun(xPara, 5); + CPPUNIT_ASSERT_EQUAL(u"Bookmark"_ustr, getProperty<OUString>(run, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(run, "IsStart")); + CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(run, "IsCollapsed")); + auto named = getProperty<uno::Reference<container::XNamed>>(run, "Bookmark"); + CPPUNIT_ASSERT_EQUAL(u"bookmark3"_ustr, named->getName()); + } + + { + auto run = getRun(xPara, 6); + CPPUNIT_ASSERT_EQUAL(u"Text"_ustr, getProperty<OUString>(run, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(u"bar"_ustr, run->getString()); + } + + { + auto run = getRun(xPara, 7); + CPPUNIT_ASSERT_EQUAL(u"Bookmark"_ustr, getProperty<OUString>(run, "TextPortionType")); + CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(run, "IsStart")); + CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(run, "IsCollapsed")); + auto named = getProperty<uno::Reference<container::XNamed>>(run, "Bookmark"); + CPPUNIT_ASSERT_EQUAL(u"bookmark3"_ustr, named->getName()); + } + + // Test that the markup stays at save-and-reload + xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); + + assertXPathNodeName(pXmlDoc, "//office:body/office:text/text:p/*[1]"_ostr, + "bookmark-start"_ostr); + assertXPath(pXmlDoc, "//office:body/office:text/text:p/*[1]"_ostr, "name"_ostr, + u"bookmark1"_ustr); + + // Without the fix in place, this would fail with + // - Expected: bookmark-end + // - Actual : bookmark-start + // - In XPath '//office:body/office:text/text:p/*[2]' name of node is incorrect + assertXPathNodeName(pXmlDoc, "//office:body/office:text/text:p/*[2]"_ostr, "bookmark-end"_ostr); + assertXPath(pXmlDoc, "//office:body/office:text/text:p/*[2]"_ostr, "name"_ostr, + u"bookmark1"_ustr); + + assertXPathNodeName(pXmlDoc, "//office:body/office:text/text:p/*[3]"_ostr, "bookmark"_ostr); + assertXPath(pXmlDoc, "//office:body/office:text/text:p/*[3]"_ostr, "name"_ostr, + u"bookmark2"_ustr); + + assertXPathNodeName(pXmlDoc, "//office:body/office:text/text:p/*[4]"_ostr, + "bookmark-start"_ostr); + assertXPath(pXmlDoc, "//office:body/office:text/text:p/*[4]"_ostr, "name"_ostr, + u"bookmark3"_ustr); + + assertXPathNodeName(pXmlDoc, "//office:body/office:text/text:p/*[5]"_ostr, "bookmark-end"_ostr); + assertXPath(pXmlDoc, "//office:body/office:text/text:p/*[5]"_ostr, "name"_ostr, + u"bookmark3"_ustr); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/ooxmlexport/data/tdf158597.docx b/sw/qa/extras/ooxmlexport/data/tdf158597.docx Binary files differnew file mode 100644 index 0000000000..ad7924ce71 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf158597.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx index cdcdfe7785..e902f7a7b8 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx @@ -9,12 +9,15 @@ #include <swmodeltestbase.hxx> +#include <com/sun/star/awt/FontSlant.hpp> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/text/XDocumentIndex.hpp> #include <com/sun/star/text/XTextTable.hpp> #include <com/sun/star/style/LineSpacing.hpp> #include <com/sun/star/style/LineSpacingMode.hpp> +#include <comphelper/sequenceashashmap.hxx> + #include <pam.hxx> #include <unotxdoc.hxx> #include <docsh.hxx> @@ -30,6 +33,261 @@ public: } }; +DECLARE_OOXMLEXPORT_TEST(testTdf158597, "tdf158597.docx") +{ + // test with 2 properties: font size, italic (toggle) + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(1)); + CPPUNIT_ASSERT_EQUAL(OUString("No style"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(11.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, getProperty<awt::FontSlant>(xRun, "CharPosture")); + CPPUNIT_ASSERT(!xProps->getPropertyValue("ListAutoFormat").hasValue()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(2)); + CPPUNIT_ASSERT_EQUAL(OUString("Char style mark"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(11.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, getProperty<awt::FontSlant>(xRun, "CharPosture")); + comphelper::SequenceAsHashMap listAutoFormat(xProps->getPropertyValue("ListAutoFormat")); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), listAutoFormat["CharStyleName"].get<OUString>()); + CPPUNIT_ASSERT(!listAutoFormat["CharHeight"].hasValue()); + CPPUNIT_ASSERT(!listAutoFormat["CharPosture"].hasValue()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(3)); + CPPUNIT_ASSERT_EQUAL(OUString("Char style mark and text"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + getProperty<awt::FontSlant>(xRun, "CharPosture")); + comphelper::SequenceAsHashMap listAutoFormat(xProps->getPropertyValue("ListAutoFormat")); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), listAutoFormat["CharStyleName"].get<OUString>()); + CPPUNIT_ASSERT(!listAutoFormat["CharHeight"].hasValue()); + CPPUNIT_ASSERT(!listAutoFormat["CharPosture"].hasValue()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(4)); + CPPUNIT_ASSERT_EQUAL(OUString("Char style text"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + getProperty<awt::FontSlant>(xRun, "CharPosture")); + CPPUNIT_ASSERT(!xProps->getPropertyValue("ListAutoFormat").hasValue()); + } + + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(5)); + CPPUNIT_ASSERT_EQUAL(OUString("Para style"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph E"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + getProperty<awt::FontSlant>(xRun, "CharPosture")); + CPPUNIT_ASSERT(!xProps->getPropertyValue("ListAutoFormat").hasValue()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(6)); + CPPUNIT_ASSERT_EQUAL(OUString("Para style + Char style mark"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph E"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + getProperty<awt::FontSlant>(xRun, "CharPosture")); + comphelper::SequenceAsHashMap listAutoFormat(xProps->getPropertyValue("ListAutoFormat")); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), listAutoFormat["CharStyleName"].get<OUString>()); + CPPUNIT_ASSERT(!listAutoFormat["CharHeight"].hasValue()); + // bug was that here the toggle property was not overwritten + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, + listAutoFormat["CharPosture"].get<awt::FontSlant>()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(7)); + CPPUNIT_ASSERT_EQUAL(OUString("Para style + Char style mark and text"), + xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph E"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, getProperty<awt::FontSlant>(xRun, "CharPosture")); + comphelper::SequenceAsHashMap listAutoFormat(xProps->getPropertyValue("ListAutoFormat")); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), listAutoFormat["CharStyleName"].get<OUString>()); + CPPUNIT_ASSERT(!listAutoFormat["CharHeight"].hasValue()); + // bug was that here the toggle property was not overwritten + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, + listAutoFormat["CharPosture"].get<awt::FontSlant>()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(8)); + CPPUNIT_ASSERT_EQUAL(OUString("Para style + Char style text"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph E"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, getProperty<awt::FontSlant>(xRun, "CharPosture")); + CPPUNIT_ASSERT(!xProps->getPropertyValue("ListAutoFormat").hasValue()); + } + + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(9)); + CPPUNIT_ASSERT_EQUAL(OUString("No style + direct mark"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(11.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, getProperty<awt::FontSlant>(xRun, "CharPosture")); + comphelper::SequenceAsHashMap listAutoFormat(xProps->getPropertyValue("ListAutoFormat")); + CPPUNIT_ASSERT(!listAutoFormat["CharStyleName"].hasValue()); + CPPUNIT_ASSERT_EQUAL(16.f, listAutoFormat["CharHeight"].get<float>()); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + listAutoFormat["CharPosture"].get<awt::FontSlant>()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(10)); + CPPUNIT_ASSERT_EQUAL(OUString("Char style + direct mark"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(11.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, getProperty<awt::FontSlant>(xRun, "CharPosture")); + comphelper::SequenceAsHashMap listAutoFormat(xProps->getPropertyValue("ListAutoFormat")); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), listAutoFormat["CharStyleName"].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(16.f, listAutoFormat["CharHeight"].get<float>()); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + listAutoFormat["CharPosture"].get<awt::FontSlant>()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(11)); + CPPUNIT_ASSERT_EQUAL(OUString("Char style + direct mark and text"), + xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + getProperty<awt::FontSlant>(xRun, "CharPosture")); + comphelper::SequenceAsHashMap listAutoFormat(xProps->getPropertyValue("ListAutoFormat")); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), listAutoFormat["CharStyleName"].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(16.f, listAutoFormat["CharHeight"].get<float>()); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + listAutoFormat["CharPosture"].get<awt::FontSlant>()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(12)); + CPPUNIT_ASSERT_EQUAL(OUString("Char style + direct text"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + getProperty<awt::FontSlant>(xRun, "CharPosture")); + CPPUNIT_ASSERT(!xProps->getPropertyValue("ListAutoFormat").hasValue()); + } + + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(13)); + CPPUNIT_ASSERT_EQUAL(OUString("Para style + direct mark"), xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph E"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + getProperty<awt::FontSlant>(xRun, "CharPosture")); + comphelper::SequenceAsHashMap listAutoFormat(xProps->getPropertyValue("ListAutoFormat")); + CPPUNIT_ASSERT(!listAutoFormat["CharStyleName"].hasValue()); + CPPUNIT_ASSERT_EQUAL(16.f, listAutoFormat["CharHeight"].get<float>()); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + listAutoFormat["CharPosture"].get<awt::FontSlant>()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(14)); + CPPUNIT_ASSERT_EQUAL(OUString("Para style + Char style + direct mark"), + xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph E"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + getProperty<awt::FontSlant>(xRun, "CharPosture")); + comphelper::SequenceAsHashMap listAutoFormat(xProps->getPropertyValue("ListAutoFormat")); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), listAutoFormat["CharStyleName"].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(16.f, listAutoFormat["CharHeight"].get<float>()); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + listAutoFormat["CharPosture"].get<awt::FontSlant>()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(15)); + CPPUNIT_ASSERT_EQUAL(OUString("Para style + Char style + direct mark and text"), + xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph E"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + getProperty<awt::FontSlant>(xRun, "CharPosture")); + comphelper::SequenceAsHashMap listAutoFormat(xProps->getPropertyValue("ListAutoFormat")); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), listAutoFormat["CharStyleName"].get<OUString>()); + CPPUNIT_ASSERT_EQUAL(16.f, listAutoFormat["CharHeight"].get<float>()); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + listAutoFormat["CharPosture"].get<awt::FontSlant>()); + } + { + uno::Reference<text::XTextRange> xParagraph(getParagraph(16)); + CPPUNIT_ASSERT_EQUAL(OUString("Para style + Char style + direct text"), + xParagraph->getString()); + uno::Reference<beans::XPropertySet> xProps(xParagraph, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph E"), + getProperty<OUString>(xProps, "ParaStyleName")); + uno::Reference<text::XTextRange> xRun(getRun(xParagraph, 1)); + CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(xRun, "CharStyleName")); + CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(xRun, "CharHeight")); + CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, + getProperty<awt::FontSlant>(xRun, "CharPosture")); + CPPUNIT_ASSERT(!xProps->getPropertyValue("ListAutoFormat").hasValue()); + } +} + DECLARE_OOXMLEXPORT_TEST(testTdf153909_followTextFlow, "tdf153909_followTextFlow.docx") { // Although MSO's UI reports "layoutInCell" for the rectangle, it isn't specified or honored diff --git a/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf b/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf new file mode 100644 index 0000000000..6e76676299 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/fdo55504-1-min.rtf @@ -0,0 +1,49 @@ +{\rtf1\adeflang1025\ansi\ansicpg1251\uc1\adeff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1049\deflangfe1049{\fonttbl{\f0\froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset204\fprq2{\*\panose 020b0604020202020204}Arial;}{\f39\froman\fcharset0\fprq2 Times New Roman;}
+{\f37\froman\fcharset238\fprq2 Times New Roman CE;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\f43\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f49\fswiss\fcharset0\fprq2 Arial;}
+{\f47\fswiss\fcharset238\fprq2 Arial CE;}{\f50\fswiss\fcharset161\fprq2 Arial Greek;}{\f51\fswiss\fcharset162\fprq2 Arial Tur;}{\f52\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f53\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
+{\f54\fswiss\fcharset186\fprq2 Arial Baltic;}{\f55\fswiss\fcharset163\fprq2 Arial (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;
+\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
+\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1049\langfe1049\cgrid\langnp1049\langfenp1049 \snext0 Normal;}{\*\cs10 \additive \ssemihidden
+Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}
+{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\revtbl {Unknown;}}{\*\rsidtbl \rsid3757467}{\*\generator Microsoft Word 11.0.0000;}{\info{\title \'d1\'cf\'d0\'c0\'c2\'ca\'c0 \'b9 6785}{\author Crystal Reports}{\doccomm Powered By Crystal}
+{\operator \'cf\'f0\'ee\'e3\'f0\'e0\'ec\'ec\'e8\'f1\'f2}{\creatim\yr2012\mo9\dy26\hr11\min39}{\revtim\yr2012\mo9\dy26\hr11\min39}{\version2}{\edmins0}{\nofpages2}{\nofwords529}{\nofchars3021}{\*\company Crystal Decisions}{\nofcharsws3543}
+{\vern24611}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw16836\paperh11904\margl567\margr397\margt567\margb284\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3
+\jcompress\viewkind1\viewscale100\rsidroot3757467 \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\lndscpsxn\sbknone\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2
+\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
+{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\qc \li0\ri0\nowidctlpar
+\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9360\tx9720\tx10080\tx10440\tx10800\tx11160\tx11520\tx11880
+\tx12240\tx12600\pvpg\phpg\posx2007\posy597\absh-900\absw12870\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1049\langfe1049\cgrid\langnp1049\langfenp1049 {\rtlch\fcs1 \af0 \ltrch\fcs0
+\lang1024\langfe1024\noproof\insrsid3757467 {\shp{\*\shpinst\shpleft6567\shptop3832\shpright8713\shpbottom3832\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz0\shplid1026
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lineWidth}{\sv 12700}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn posrelh}{\sv 1}}{\sp{\sn posrelv}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}{\sp{\sn fBehindDocument}{\sv 1}}
+{\sp{\sn fLayoutInCell}{\sv 0}}}{\shprslt{\*\do\dobxpage\dobypage\dodhgt0\dpline\dpptx0\dppty0\dpptx2146\dppty0\dpx6567\dpy3832\dpxsize2146\dpysize0\dplinew20\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft9912\shptop3862\shpright12073\shpbottom3862\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz1\shplid1027{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lineWidth}{\sv 12700}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn posrelh}{\sv 1}}{\sp{\sn posrelv}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}{\sp{\sn fBehindDocument}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}}{\shprslt{\*\do\dobxpage\dobypage\dodhgt1
+\dpline\dpptx0\dppty0\dpptx2161\dppty0\dpx9912\dpy3862\dpxsize2161\dpysize0\dplinew20\dplinecor0\dplinecog0\dplinecob0}}}
+}
+{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f1\fs17\cf1\insrsid3757467 \'d1\'cf\'d0\'c0\'c2\'ca\'c0 \'b9 6785}{\rtlch\fcs1 \af1 \ltrch\fcs0
+\f1\insrsid3757467
+\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f1\fs17\cf1\insrsid3757467 \'ce \'d1\'ce\'d1\'d2\'ce\'df\'cd\'c8\'c8 \'d0\'c0\'d1\'d7\'c5\'d2\'ce\'c2 \'cf\'ce \'cd\'c0\'cb\'ce\'c3\'c0\'cc, \'d1\'c1\'ce\'d0\'c0\'cc, \'cf\'c5\'cd\'df\'cc \'c8 \'d8\'d2\'d0\'c0\'d4\'c0\'cc
+}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid3757467
+\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f1\fs17\cf1\insrsid3757467 \'ee\'f0\'e3\'e0\'ed\'e8\'e7\'e0\'f6\'e8\'e9 \'e8 \'e8\'ed\'e4\'e8\'e2\'e8\'e4\'f3\'e0\'eb\'fc\'ed\'fb\'f5 \'ef\'f0\'e5\'e4\'ef\'f0\'e8\'ed\'e8\'ec\'e0\'f2\'e5\'eb\'e5\'e9}{\rtlch\fcs1 \af1
+\ltrch\fcs0 \f1\insrsid3757467
+\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \b\f1\fs17\cf1\insrsid3757467 \'ef\'ee \'f1\'ee\'f1\'f2\'ee\'ff\'ed\'e8\'fe \'ed\'e0 << 26 >> \'d1\'e5\'ed\'f2\'ff\'e1\'f0\'fc 2012\'e3.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid3757467
+\par }
+\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid3757467 \page \sect }\sectd \ltrsect\lndscpsxn\sbknone\linex0\sectdefaultcl\sftnbj \pard\plain \ltrpar\ql \li0\ri0\nowidctlpar
+\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9360\tx9720\tx10080\tx10440\tx10800\tx11160\tx11520\tx11880
+\tx12240\pvpg\phpg\posx612\posy627\absh-225\absw12480\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1049\langfe1049\cgrid\langnp1049\langfenp1049 {\rtlch\fcs1 \af0 \ltrch\fcs0
+\lang1024\langfe1024\noproof\insrsid3757467 {\shp{\*\shpinst\shpleft567\shptop867\shpright16423\shpbottom867\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz29\shplid1055
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lineWidth}{\sv 12700}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn posrelh}{\sv 1}}{\sp{\sn posrelv}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}{\sp{\sn fBehindDocument}{\sv 1}}
+{\sp{\sn fLayoutInCell}{\sv 0}}}{\shprslt{\*\do\dobxpage\dobypage\dodhgt29\dpline\dpptx0\dppty0\dpptx15856\dppty0\dpx567\dpy867\dpxsize15856\dpysize0\dplinew20\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft567\shptop1167\shpright16439\shpbottom1167\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz30\shplid1056{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lineWidth}{\sv 12700}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn posrelh}{\sv 1}}{\sp{\sn posrelv}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}{\sp{\sn fBehindDocument}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 0}}}{\shprslt{\*\do\dobxpage\dobypage\dodhgt30
+\dpline\dpptx0\dppty0\dpptx15872\dppty0\dpx567\dpy1167\dpxsize15872\dpysize0\dplinew20\dplinecor0\dplinecog0\dplinecob0}}}
+}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\fs17\cf1\insrsid3757467 \'cc\'f3\'ed\'e8\'f6\'e8\'ef\'e0\'eb\'fc\'ed\'ee\'e5 \'e4\'ee\'f8\'ea\'ee
+\'eb\'fc\'ed\'ee\'e5 \'ee\'e1\'f0\'e0\'e7\'ee\'e2\'e0\'f2\'e5\'eb\'fc\'ed\'ee\'e5 \'f3\'f7\'f0\'e5\'e6\'e4\'e5\'ed\'e8\'e5 \'e4\'e5\'f2\'f1\'ea\'e8\'e9 \'f1\'e0\'e4 \'b99 "\'d0\'ee\'ec\'e0\'f8\'ea\'e0" \'ca\'f3\'f0\'f1\'ea\'ee\'e3\'ee \'ec\'f3\'ed\'e8\'f6
+\'e8\'ef\'e0\'eb\'fc\'ed\'ee\'e3\'ee \'f0\'e0\'e9\'ee\'ed\'e0 \'d1\'f2\'e0\'e2\'f0\'ee\'ef\'ee\'eb\'fc\'f1\'ea\'ee\'e3\'ee \'ea\'f0\'e0\'ff}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid3757467
+\par }
+\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid3757467
+\par }}
diff --git a/sw/qa/extras/rtfexport/data/piccrop.rtf b/sw/qa/extras/rtfexport/data/piccrop.rtf new file mode 100644 index 0000000000..4e8a704205 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/piccrop.rtf @@ -0,0 +1,74 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1028\themelang1033\themelangfe1028\themelangcs1025{\fonttbl{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial{\*\falt Arial};}
+{\f14\fbidi \fnil\fcharset136\fprq2{\*\panose 02010601000101010101}PMingLiU{\*\falt Arial Unicode MS};}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}
+{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f291\fbidi \fnil\fcharset136\fprq2{\*\panose 00000000000000000000}@PMingLiU;}
+{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Arial};}{\fdbmajor\f31501\fbidi \fnil\fcharset136\fprq2{\*\panose 02010601000101010101}PMingLiU{\*\falt Arial Unicode MS};}
+{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Arial};}
+{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Arial};}{\fdbminor\f31505\fbidi \fnil\fcharset136\fprq2{\*\panose 02010601000101010101}PMingLiU{\*\falt Arial Unicode MS};}
+{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial{\*\falt Arial};}{\f302\fbidi \fswiss\fcharset238\fprq2 Arial CE{\*\falt Arial};}
+{\f303\fbidi \fswiss\fcharset204\fprq2 Arial Cyr{\*\falt Arial};}{\f305\fbidi \fswiss\fcharset161\fprq2 Arial Greek{\*\falt Arial};}{\f306\fbidi \fswiss\fcharset162\fprq2 Arial Tur{\*\falt Arial};}
+{\f307\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew){\*\falt Arial};}{\f308\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic){\*\falt Arial};}{\f309\fbidi \fswiss\fcharset186\fprq2 Arial Baltic{\*\falt Arial};}
+{\f310\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese){\*\falt Arial};}{\f632\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f633\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f635\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}
+{\f636\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f639\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f640\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f662\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}
+{\f663\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f665\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f666\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f667\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}
+{\f668\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f669\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f670\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
+{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Arial};}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Arial};}
+{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Arial};}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Arial};}
+{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Arial};}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Arial};}
+{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Arial};}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Arial};}{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}
+{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}
+{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}
+{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Arial};}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Arial};}
+{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Arial};}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Arial};}
+{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Arial};}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Arial};}
+{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Arial};}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Arial};}
+{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Arial};}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Arial};}
+{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Arial};}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Arial};}
+{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Arial};}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Arial};}
+{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Arial};}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Arial};}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}
+{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
+{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
+{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \fswiss\fcharset238\fprq2 Arial CE{\*\falt Arial};}{\fbiminor\f31579\fbidi \fswiss\fcharset204\fprq2 Arial Cyr{\*\falt Arial};}
+{\fbiminor\f31581\fbidi \fswiss\fcharset161\fprq2 Arial Greek{\*\falt Arial};}{\fbiminor\f31582\fbidi \fswiss\fcharset162\fprq2 Arial Tur{\*\falt Arial};}{\fbiminor\f31583\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew){\*\falt Arial};}
+{\fbiminor\f31584\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic){\*\falt Arial};}{\fbiminor\f31585\fbidi \fswiss\fcharset186\fprq2 Arial Baltic{\*\falt Arial};}{\fbiminor\f31586\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese){\*\falt Arial};}
+{\f292\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Arial};}{\f293\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Arial};}{\f295\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Arial};}
+{\f296\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Arial};}{\f297\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Arial};}{\f298\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Arial};}
+{\f299\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Arial};}{\f300\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Arial};}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;
+\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;
+\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{
+\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1028\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1028
+\snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1028\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1028 \snext11 \ssemihidden \sunhideused
+Normal Table;}}{\*\rsidtbl \rsid1539605\rsid6818220\rsid9513591}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author ms}{\operator ms}
+{\creatim\yr2024\mo2\dy13\hr14\min53}{\revtim\yr2024\mo2\dy13\hr14\min57}{\version1}{\edmins4}{\nofpages1}{\nofwords0}{\nofchars1}{\nofcharsws1}{\vern57435}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}
+\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen
+\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
+\asianbrkrule\rsidroot1539605\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
+{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj
+\pard\plain \ltrpar\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0
+\fs22\lang1033\langfe1028\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1028 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid9513591\charrsid4597901 {\*\shppict
+{\pict{\*\picprop\shplid1025{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLockAspectRatio}{\sv 1}}{\sp{\sn fLockPosition}{\sv 0}}{\sp{\sn fLockAgainstSelect}{\sv 0}}{\sp{\sn fLockAgainstGrouping}{\sv 0}}
+{\sp{\sn pictureGray}{\sv 0}}{\sp{\sn pictureBiLevel}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn wzName}{\sv Picture 1}}{\sp{\sn dhgt}{\sv 251658240}}{\sp{\sn fHidden}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}}
+\picscalex780\picscaley780\piccropl70\piccropr70\piccropt70\piccropb70\picw503\pich503\picwgoal285\pichgoal285\pngblip\bliptag-2138324634{\*\blipuid 808bc16643ef1085bdc9d6183a9f49dc}
+89504e470d0a1a0a0000000d4948445200000013000000130806000000725036cc0000000467414d410000d6d8d44f58320000001974455874536f6674776172
+650041646f626520496d616765526561647971c9653c000001694944415478da62fcffff3f03b50040003111a3e8e3646ba26c04082026620ce2bf720cc5c049
+eb57fe076174b50001c4448c41479f3232201bd83b733356f50001c4448c4120806e20360010404cc418c4d1b81dc5c04bdef7192e5d7a8da10f208098883148
+53d312c3c05ea1e518860104101331067171f1613510ddcb0001c4448c4120408c810001c4084ab4f80cfaf6ed13dc6618fffaf5e30c3fea3dc162d6d240fd3a
+560cfcb9471901028809dda0a83f5128068134e6752f02d3203ecc852075e82e040820963b56750c0c5640d700258c8ddd195d1ba7fc87790d64c0f42db71926
+95c6810dcc84a8011be86a69c1605dbf84f1ecd99dffcf425d0e10400c206f22e3e486c9ff41e0ebd78fff416c108d8d0f5587a2172080f0e680ddc74fa04400
+888f0f000410130315014000b160130405f48f1f5fb16ac0250e02000184d53050c0e302f7ef5fc229071040580d03c5200cc87bc4e09443070001c448cd921620c000313009ee012707180000000049454e44ae426082}}{\nonshppict
+{\pict\picscalex781\picscaley790\piccropl70\piccropr70\piccropt70\piccropb70\picw503\pich503\picwgoal285\pichgoal285\wmetafile8\bliptag-2138324634{\*\blipuid 808bc16643ef1085bdc9d6183a9f49dc}
+010009000003370100000000b300000000000400000003010800050000000b0200000000050000000c0214001400030000001e00040000000701040004000000
+070104000800000026060f000600544e505006014b000000410b8600ee0013001300000000001300130000000000280000001300000013000000010001000000
+0000000000000000000000000000000000000000000000000000ffffff000000000c0ffe000c0ffe00000ffe00000ffe00000ffe00000ffe0000effee000ffff
+e0007fffc0003fff80001fff00000ffe000507fe000003fe000c01f6000c00e600000040000000000000b3000000410bc6008800130013000000000013001300
+000000002800000013000000130000000100040000000000000000000000000000000000000000000000000000000000ffffff004ba1f3000078ff00b5baa000
+035dcd006d592c00c3d4d400a2907500f3f7f700eaf0f00000000000000000000000000000000000000000001111111111111111111001011111888666668881
+11100101111187761116778111100801111189a61116a98111100706111181961116918111100100111181961116918111100106111181989198918111100101
+77718117898711817770080123556919787919655320090612355791999197553210010011235579111975532110090811123557919755321110070111112355
+797553211110080111111235575532811110010911111123555326411110024c1111111235321641111009011111111123211441111002031111111112111111111005031111111111111111111005070800000026060f000600544e50500701040000002701ffff030000000000}}}{\rtlch\fcs1 \af31507
+\ltrch\fcs0 \insrsid6818220
+\par }
+}
diff --git a/sw/qa/extras/rtfexport/data/tdf159824_axialGradient.odt b/sw/qa/extras/rtfexport/data/tdf159824_axialGradient.odt Binary files differnew file mode 100644 index 0000000000..c1ce5cd31d --- /dev/null +++ b/sw/qa/extras/rtfexport/data/tdf159824_axialGradient.odt diff --git a/sw/qa/extras/rtfexport/rtfexport2.cxx b/sw/qa/extras/rtfexport/rtfexport2.cxx index c718dfffd7..e194db83e4 100644 --- a/sw/qa/extras/rtfexport/rtfexport2.cxx +++ b/sw/qa/extras/rtfexport/rtfexport2.cxx @@ -523,7 +523,8 @@ DECLARE_RTFEXPORT_TEST(testFdo48446, "fdo48446.rtf") DECLARE_RTFEXPORT_TEST(testFdo47495, "fdo47495.rtf") { // Used to have 4 paragraphs, as a result the original bugdoc had 2 pages instead of 1. - CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); + // Word 2013 shows 1 paragraph + CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); } DECLARE_RTFEXPORT_TEST(testAllGapsWord, "all_gaps_word.rtf") diff --git a/sw/qa/extras/rtfexport/rtfexport8.cxx b/sw/qa/extras/rtfexport/rtfexport8.cxx index 08ca8452f9..ab787919df 100644 --- a/sw/qa/extras/rtfexport/rtfexport8.cxx +++ b/sw/qa/extras/rtfexport/rtfexport8.cxx @@ -9,9 +9,12 @@ #include <swmodeltestbase.hxx> +#include <com/sun/star/awt/FontWeight.hpp> +#include <com/sun/star/awt/Gradient2.hpp> +#include <com/sun/star/drawing/FillStyle.hpp> +#include <com/sun/star/text/GraphicCrop.hpp> #include <com/sun/star/text/XFootnote.hpp> #include <com/sun/star/text/XFootnotesSupplier.hpp> -#include <com/sun/star/awt/FontWeight.hpp> #include <com/sun/star/text/XEndnotesSupplier.hpp> #include <com/sun/star/text/XTextFieldsSupplier.hpp> #include <com/sun/star/text/XTextTablesSupplier.hpp> @@ -20,7 +23,9 @@ #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/style/TabStop.hpp> +#include <basegfx/utils/gradienttools.hxx> #include <comphelper/sequenceashashmap.hxx> +#include <docmodel/uno/UnoGradientTools.hxx> #include <tools/UnitConversion.hxx> #include <comphelper/propertyvalue.hxx> @@ -48,6 +53,28 @@ public: } }; +DECLARE_RTFEXPORT_TEST(testTdf155663, "piccrop.rtf") +{ + auto const xShape(getShape(1)); + if (!isExported()) + { + CPPUNIT_ASSERT_EQUAL(sal_Int32(2004), xShape->getSize().Height); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2004), xShape->getSize().Width); + } + else // bit of rounding loss? + { + CPPUNIT_ASSERT_EQUAL(sal_Int32(2013), xShape->getSize().Height); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2013), xShape->getSize().Width); + } + CPPUNIT_ASSERT_EQUAL(sal_Int32(123), getProperty<text::GraphicCrop>(xShape, "GraphicCrop").Top); + CPPUNIT_ASSERT_EQUAL(sal_Int32(123), + getProperty<text::GraphicCrop>(xShape, "GraphicCrop").Bottom); + CPPUNIT_ASSERT_EQUAL(sal_Int32(123), + getProperty<text::GraphicCrop>(xShape, "GraphicCrop").Left); + CPPUNIT_ASSERT_EQUAL(sal_Int32(123), + getProperty<text::GraphicCrop>(xShape, "GraphicCrop").Right); +} + DECLARE_RTFEXPORT_TEST(testTdf158586_0, "tdf158586_pageBreak0.rtf") { // The specified page break must be lost because it is in a text frame @@ -109,6 +136,27 @@ DECLARE_RTFEXPORT_TEST(testTdf158586_lostFrame, "tdf158586_lostFrame.rtf") CPPUNIT_ASSERT_EQUAL(2, getPages()); } +DECLARE_RTFEXPORT_TEST(testTdf158983, "fdo55504-1-min.rtf") +{ + // the problem was that the page break was missing and the shapes were + // all anchored to the same node + + const auto& pLayout = parseLayoutDump(); + assertXPath(pLayout, "/root/page[1]/body/section/txt"_ostr, 1); + assertXPath(pLayout, "/root/page[1]/body/section/txt/anchored/fly"_ostr, 1); + // Word shows these shapes anchored in the fly, not body, but at least they are not lost + assertXPath(pLayout, "/root/page[1]/body/section/txt/anchored/SwAnchoredDrawObject"_ostr, 2); + // page break, paragraph break, section break. + assertXPath(pLayout, "/root/page[2]/body/section[1]/txt"_ostr, 1); + assertXPath(pLayout, "/root/page[2]/body/section[1]/txt/anchored"_ostr, 0); + assertXPath(pLayout, "/root/page[2]/body/section[2]/txt"_ostr, 1); + assertXPath(pLayout, "/root/page[2]/body/section[2]/txt/anchored/fly"_ostr, 1); + // Word shows these shapes anchored in the fly, not body, but at least they are not lost + assertXPath(pLayout, "/root/page[2]/body/section[2]/txt/anchored/SwAnchoredDrawObject"_ostr, 2); + + CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + DECLARE_RTFEXPORT_TEST(testAnnotationPar, "tdf136445-1-min.rtf") { // the problem was that the paragraph break following annotation was missing @@ -130,8 +178,38 @@ DECLARE_RTFEXPORT_TEST(testTdf158826_extraCR, "tdf158826_extraCR.rtf") // The page break defined before the document content should not cause a page break CPPUNIT_ASSERT_EQUAL(1, getPages()); - // There is a two-column floating table [that SHOULD be getParagraphOrTable(1)] - uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2), uno::UNO_QUERY_THROW); + // There is a two-column floating table + uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY_THROW); +} + +CPPUNIT_TEST_FIXTURE(Test, testTdf159824_axialGradient) +{ + // given a frame with an axial gradient (white - green - white) + loadAndReload("tdf159824_axialGradient.odt"); + + uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), + uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, + getProperty<drawing::FillStyle>(xFrame, "FillStyle")); + awt::Gradient2 aGradient = getProperty<awt::Gradient2>(xFrame, "FillGradient"); + + //const Color aColA(0x127622); // green + //const Color aColB(0xffffff); // white + + // MCGR: Use the completely imported transparency gradient to check for correctness + basegfx::BColorStops aColorStops = model::gradient::getColorStopsFromUno(aGradient.ColorStops); + + // expected: a 3-color linear gradient (or better yet a 2-color AXIAL gradient) + CPPUNIT_ASSERT_EQUAL(size_t(3), aColorStops.size()); + CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_LINEAR, aGradient.Style); + CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0)); + //CPPUNIT_ASSERT_EQUAL(aColB, Color(aColorStops[0].getStopColor())); + // CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 0.5)); + // CPPUNIT_ASSERT_EQUAL(aColA, Color(aColorStops[1].getStopColor())); + // CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[2].getStopOffset(), 1.0)); + // CPPUNIT_ASSERT_EQUAL(aColB, Color(aColorStops[2].getStopColor())); } DECLARE_RTFEXPORT_TEST(testTdf158830, "tdf158830.rtf") diff --git a/sw/qa/extras/rtfimport/data/tdf153196.rtf b/sw/qa/extras/rtfimport/data/tdf153196.rtf new file mode 100644 index 0000000000..835cdeeb41 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf153196.rtf @@ -0,0 +1,114 @@ +{\rtf1\adeflang1025\ansi\ansicpg1250\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1038\deflangfe1038\themelang1038\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}{\f39\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
+{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Times New Roman};}
+{\f364\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\f365\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
+{\f367\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\f368\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}
+{\f369\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}{\f370\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}
+{\f371\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\f372\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}
+{\f364\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\f365\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
+{\f367\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\f368\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}
+{\f369\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}{\f370\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}
+{\f371\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\f372\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}{\f754\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}
+{\f755\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f757\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f758\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f759\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}
+{\f760\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f761\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f762\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
+{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
+{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}
+{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}
+{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}
+{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
+{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}
+{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}
+{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}
+{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}
+{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}
+{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}
+{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}
+{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}
+{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}
+{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}
+{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}
+{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}
+{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}
+{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}
+{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}
+{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}
+{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}
+{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
+{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}
+{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
+{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE{\*\falt Times New Roman};}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Times New Roman};}
+{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Times New Roman};}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Times New Roman};}
+{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Times New Roman};}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Times New Roman};}
+{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Times New Roman};}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese){\*\falt Times New Roman};}}{\colortbl;\red0\green0\blue0;
+\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;
+\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22\lang1038\langfe1033\langfenp1033 }{\*\defpap \ql \li0\ri0\sa160\sl259\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025
+\ltrch\fcs0 \f31506\fs22\lang1038\langfe1033\cgrid\langnp1038\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1038\langfe1033\cgrid\langnp1038\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}{
+\s15\ql \li0\ri0\widctlpar\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1038\langfe1033\cgrid\langnp1038\langfenp1033
+\sbasedon0 \snext15 \slink16 \sunhideused \styrsid13502046 header;}{\*\cs16 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \slink15 \slocked \styrsid13502046 Header Char;}{\s17\ql \li0\ri0\widctlpar
+\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1038\langfe1033\cgrid\langnp1038\langfenp1033
+\sbasedon0 \snext17 \slink18 \sunhideused \styrsid13502046 footer;}{\*\cs18 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \sbasedon10 \slink17 \slocked \styrsid13502046 Footer Char;}}{\*\rsidtbl \rsid4006494\rsid12983264\rsid13502046\rsid16343444}
+\paperw11906\paperh16838\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\deftab708\widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml1\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0
+\showxmlerrors1\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale70\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
+\asianbrkrule\rsidroot13502046\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
+\nofeaturethrottle1\ilfomacatclnup0
+\ltrpar \sectd \ltrsect\psz9\sbkeven\linex0\headery0\footery397\colsx708\endnhere\titlepg\sectlinegrid360\sectdefaultcl\sectrsid13502046\sftnbj {\footerf \ltrpar \pard\plain \ltrpar\s17\ql \li0\ri0\widctlpar
+\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1038\langfe1033\cgrid\langnp1038\langfenp1033 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13502046
+Hello world!
+\par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}
+{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\sa160\sl259\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1038\langfe1033\cgrid\langnp1038\langfenp1033 {\rtlch\fcs1 \af31507 \ltrch\fcs0
+\lang1024\langfe1024\noproof\insrsid13502046 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.
+
+\par Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.
+\par Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.
+\par Aenean nec lorem. In porttitor. Donec laoreet nonummy augue.
+\par Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy.
+\par Fusce aliquet pede non pede. Suspendisse dapibus lorem pellentesque magna. Integer nulla.
+\par Donec blandit feugiat ligula. Donec hendrerit, felis et imperdiet euismod, purus ipsum pretium metus, in lacinia nulla nisl eget sapien. Donec ut est in lectus consequat consequat.
+\par Etiam eget dui. Aliquam erat volutpat. Sed at lorem in nunc porta tristique.
+\par Proin nec augue. Quisque aliquam tempor magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
+\par Nunc ac magna. Maecenas odio dolor, vulputate vel, auctor ac, accumsan id, felis. Pellentesque cursus sagittis felis.
+\par Pellentesque porttitor, velit lacinia egestas auctor, diam eros tempus arcu, nec vulputate augue magna vel risus. Cras non magna vel ante adipiscing rhoncus. Vivamus a mi.
+\par Morbi neque. Aliquam erat volutpat. Integer ultrices lobortis eros.
+\par Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egest
+as. Proin semper, ante vitae sollicitudin posuere, metus quam iaculis nibh, vitae scelerisque nunc massa eget pede. Sed velit urna, interdum vel, ultricies vel, faucibus at, quam.
+\par Donec elit est, consectetuer eget, consequat quis, tempus quis, wisi. In in nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos.
+\par Donec ullamcorper fringilla eros. Fusce in sapien eu purus dapibus commodo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
+\par Cras faucibus condimentum odio. Sed ac ligula. Aliquam at eros.
+\par Etiam at ligula et tellus ullamcorper ultrices. In fermentum, lorem non cursus porttitor, diam urna accumsan lacus, sed interdum wisi nibh nec nisl. Ut tincidunt volutpat urna.
+\par Mauris eleifend nulla eget mauris. Sed cursus quam id felis. Curabitur posuere quam vel nibh.
+\par Cras dapibus dapibus nisl. Vestibulum quis dolor a felis congue vehicula. Maecenas pede purus, tristique ac, tempus eget, egestas quis, mauris.
+\par Curabitur non eros. Nullam hendrerit bibendum justo. Fusce iaculis, est quis lacinia pretium, pede metus molestie lacus, at gravida wisi ante at libero.
+\par Quisque ornare placerat risus. Ut molestie magna at mi. Integer aliquet mauris et nibh.
+\par Ut mattis ligula posuere velit. Nunc sagittis. Curabitur varius fringilla nisl.
+\par Duis pretium mi euismod erat. Maecenas id augue. Nam vulputate.
+\par Duis a quam non neque lobortis malesuada. Praesent euismod. Donec nulla augue, venenatis scelerisque, dapibus a, consequat at, leo.
+\par Pellentesque libero lectus, tristique ac, consectetuer sit amet, imperdiet ut, justo. Sed aliquam odio vitae tortor. Proin hendrerit tempus arcu.
+\par In hac habitasse platea dictumst. Suspendisse potenti. Vivamus vitae massa adipiscing est lacinia sodales.
+\par Donec metus massa, mollis vel, tempus placerat, vestibulum condimentum, ligula. Nunc lacus metus, posuere eget, lacinia eu, varius quis, libero. Aliquam nonummy adipiscing augue.
+\par Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.
+\par Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.
+\par }\pard \ltrpar\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13502046 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid13502046
+Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.
+\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13502046
+\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13502046\charrsid13502046 \sect }\sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\footerr \ltrpar \pard\plain \ltrpar\s17\ql \li0\ri0\widctlpar
+\tqc\tx4513\tqr\tx9026\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13502046 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1038\langfe1033\cgrid\langnp1038\langfenp1033 {\rtlch\fcs1 \af31507 \ltrch\fcs0
+\insrsid13502046 Other footer}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13502046\charrsid13502046
+\par }}\pard\plain \ltrpar\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1038\langfe1033\cgrid\langnp1038\langfenp1033 {\rtlch\fcs1
+\af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid13502046
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.
+\par Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.
+\par Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.
+\par Aenean nec lorem. In porttitor. Donec laoreet nonummy augue.
+\par Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy.}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid12983264
+\par }
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 1a6d1c9772..58a6857cff 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1602,6 +1602,26 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf115242) getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin")); } +CPPUNIT_TEST_FIXTURE(Test, testTdf153196) +{ + createSwDoc("tdf153196.rtf"); + + const auto& pLayout = parseLayoutDump(); + + CPPUNIT_ASSERT_EQUAL(4, getPages()); + + // TODO: Writer creates an empty page 1 here, which Word does not + assertXPath(pLayout, "/root/page[1]/footer"_ostr, 0); + assertXPath(pLayout, "/root/page[2]/footer"_ostr, 1); + // the first page (2) has a page style applied, which has a follow page + // style; the problem was that the follow page style had a footer. + assertXPath(pLayout, "/root/page[3]/footer"_ostr, 0); + assertXPath(pLayout, "/root/page[4]/footer"_ostr, 1); + + // TODO exporting this, wrongly produces "even" footer from stashed one + // TODO importing that, wrongly creates a footer even without evenAndOddHeaders +} + CPPUNIT_TEST_FIXTURE(Test, testDefaultValues) { createSwDoc("default-values.rtf"); diff --git a/sw/qa/extras/uiwriter/data/FrameInHiddenSection.fodt b/sw/qa/extras/uiwriter/data/FrameInHiddenSection.fodt new file mode 100644 index 0000000000..2095c71730 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/FrameInHiddenSection.fodt @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + <office:body> + <office:text> + <text:section text:name="Section1"> + <text:section text:name="Section2Hidden" text:display="none"> + <text:p><draw:frame text:anchor-type="paragraph" svg:x="1cm" svg:y="1cm" svg:width="1cm"> + <draw:text-box/> + </draw:frame>lorem</text:p> + </text:section> + <text:section text:name="Section3"/> + <text:section text:name="Section4"/> + <text:section text:name="Section5"> + <text:p>ipsum</text:p> + </text:section> + </text:section> + </office:text> + </office:body> +</office:document>
\ No newline at end of file diff --git a/sw/qa/extras/uiwriter/data/hiddenSectionsAroundPageBreak.fodt b/sw/qa/extras/uiwriter/data/hiddenSectionsAroundPageBreak.fodt new file mode 100644 index 0000000000..12761847ed --- /dev/null +++ b/sw/qa/extras/uiwriter/data/hiddenSectionsAroundPageBreak.fodt @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + <office:automatic-styles> + <style:style style:name="P1" style:family="paragraph" style:master-page-name="Landscape"> + <style:paragraph-properties style:page-number="auto" fo:break-before="page"/> + </style:style> + </office:automatic-styles> + <office:body> + <office:text> + <text:section text:name="Section 1" text:display="none"/> + <text:section text:name="Section 2"> + <text:p text:style-name="P1">A paragraph with a page-break-before</text:p> + </text:section> + <text:section text:name="Section 3" text:display="none"/> + <text:section text:name="Section 4"> + <text:p>Lorem</text:p> + </text:section> + </office:text> + </office:body> +</office:document>
\ No newline at end of file diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx index c1f0be1757..98fcbcae22 100644 --- a/sw/qa/extras/uiwriter/uiwriter4.cxx +++ b/sw/qa/extras/uiwriter/uiwriter4.cxx @@ -682,8 +682,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testBookmarkCollapsed) // 6. Hit Del, thus deleting "abc" (The bookmark "test" is still there). // 7. Save the document: // <text:p text:style-name="Standard"> -// <text:bookmark-start text:name="test"/> -// <text:bookmark-end text:name="test"/> +// <text:bookmark text:name="test"/> // def // </text:p> // @@ -737,14 +736,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRemoveBookmarkText) // load only content.xml from the resaved document xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); - constexpr OString aPath("/office:document-content/office:body/office:text/text:p"_ostr); - - CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pXmlDoc, aPath, "bookmark")); // not found - const int pos2 = getXPathPosition(pXmlDoc, aPath, "bookmark-start"); - const int pos3 = getXPathPosition(pXmlDoc, aPath, "bookmark-end"); - - CPPUNIT_ASSERT_EQUAL(0, pos2); // found, and it is first - CPPUNIT_ASSERT_EQUAL(1, pos3); // found, and it is second + // Bookmark without text becomes collapsed + assertXPath(pXmlDoc, "//office:body/office:text/text:p/text:bookmark"_ostr, 1); + assertXPath(pXmlDoc, "//office:body/office:text/text:p/text:bookmark-start"_ostr, 0); + assertXPath(pXmlDoc, "//office:body/office:text/text:p/text:bookmark-end"_ostr, 0); } // 1. Open a new writer document diff --git a/sw/qa/extras/uiwriter/uiwriter9.cxx b/sw/qa/extras/uiwriter/uiwriter9.cxx index 1a3e49c257..3772955dd9 100644 --- a/sw/qa/extras/uiwriter/uiwriter9.cxx +++ b/sw/qa/extras/uiwriter/uiwriter9.cxx @@ -16,6 +16,8 @@ #include <com/sun/star/text/XTextTable.hpp> #include <com/sun/star/text/XTextViewCursorSupplier.hpp> #include <com/sun/star/text/XPageCursor.hpp> +#include <com/sun/star/view/XSelectionSupplier.hpp> + #include <comphelper/propertysequence.hxx> #include <swdtflvr.hxx> #include <o3tl/string_view.hxx> @@ -26,8 +28,10 @@ #include <ndtxt.hxx> #include <toxmgr.hxx> #include <IDocumentFieldsAccess.hxx> +#include <IDocumentLayoutAccess.hxx> #include <IDocumentRedlineAccess.hxx> #include <fmtinfmt.hxx> +#include <rootfrm.hxx> namespace { @@ -122,6 +126,80 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf135083) CPPUNIT_ASSERT(!getProperty<OUString>(xLastPara, u"ListId"_ustr).isEmpty()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testHiddenSectionsAroundPageBreak) +{ + createSwDoc("hiddenSectionsAroundPageBreak.fodt"); + + CPPUNIT_ASSERT_EQUAL(1, getPages()); + + auto xModel(mxComponent.queryThrow<frame::XModel>()); + auto xTextViewCursorSupplier( + xModel->getCurrentController().queryThrow<text::XTextViewCursorSupplier>()); + auto xCursor(xTextViewCursorSupplier->getViewCursor().queryThrow<text::XPageCursor>()); + + // Make sure that the page style is set correctly + xCursor->jumpToFirstPage(); + CPPUNIT_ASSERT_EQUAL(u"Landscape"_ustr, getProperty<OUString>(xCursor, "PageStyleName")); +} + +CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf159565) +{ + // Given a document with a hidden section in the beginning, additionally containing a frame + createSwDoc("FrameInHiddenSection.fodt"); + + dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {}); + + // Check that the selection covers the whole visible text + auto xModel(mxComponent.queryThrow<css::frame::XModel>()); + auto xSelSupplier(xModel->getCurrentController().queryThrow<css::view::XSelectionSupplier>()); + auto xSelections(xSelSupplier->getSelection().queryThrow<css::container::XIndexAccess>()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSelections->getCount()); + auto xSelection(xSelections->getByIndex(0).queryThrow<css::text::XTextRange>()); + + // Without the fix, this would fail - there was no selection + CPPUNIT_ASSERT_EQUAL(u"" SAL_NEWLINE_STRING SAL_NEWLINE_STRING "ipsum"_ustr, + xSelection->getString()); +} + +CPPUNIT_TEST_FIXTURE(SwUiWriterTest9, testTdf159816) +{ + createSwDoc(); + + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + CPPUNIT_ASSERT(pWrtShell); + + // Add 5 empty paragraphs + pWrtShell->SplitNode(); + pWrtShell->SplitNode(); + pWrtShell->SplitNode(); + pWrtShell->SplitNode(); + pWrtShell->SplitNode(); + + // Add a bookmark at the very end + IDocumentMarkAccess& rIDMA(*pDoc->getIDocumentMarkAccess()); + rIDMA.makeMark(*pWrtShell->GetCursor(), "Mark", IDocumentMarkAccess::MarkType::BOOKMARK, + sw::mark::InsertMode::New); + + // Get coordinates of the end point in the document + SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + SwFrame* pPage = pLayout->Lower(); + SwFrame* pBody = pPage->GetLower(); + SwFrame* pLastPara = pBody->GetLower()->GetNext()->GetNext()->GetNext()->GetNext()->GetNext(); + Point ptTo = pLastPara->getFrameArea().BottomRight(); + + pWrtShell->SelAll(); + + // Drag-n-drop to its own end + rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell); + // Without the fix, this would crash: either in CopyFlyInFlyImpl (tdf#159813): + // Assertion failed: !pCopiedPaM || pCopiedPaM->End()->GetNode() == rRg.aEnd.GetNode() + // or in BigPtrArray::operator[] (tdf#159816): + // Assertion failed: idx < m_nSize + xTransfer->PrivateDrop(*pWrtShell, ptTo, /*bMove=*/true, /*bXSelection=*/true); +} + } // end of anonymous namespace CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/qa/extras/ww8export/data/listWithLgl.doc b/sw/qa/extras/ww8export/data/listWithLgl.doc Binary files differnew file mode 100644 index 0000000000..94de2967fe --- /dev/null +++ b/sw/qa/extras/ww8export/data/listWithLgl.doc diff --git a/sw/qa/extras/ww8export/ww8export4.cxx b/sw/qa/extras/ww8export/ww8export4.cxx index d47c934d9d..d31bf17a31 100644 --- a/sw/qa/extras/ww8export/ww8export4.cxx +++ b/sw/qa/extras/ww8export/ww8export4.cxx @@ -228,6 +228,30 @@ DECLARE_WW8EXPORT_TEST(testInlinePageBreakFirstLine, "inlinePageBreakFirstLine.d CPPUNIT_ASSERT(IsFirstLine(aTextNodes[2])); } +CPPUNIT_TEST_FIXTURE(Test, testLegalNumbering) +{ + auto verify = [this]() { + // Second level's numbering should use Arabic numbers for first level reference + auto xPara = getParagraph(1); + CPPUNIT_ASSERT_EQUAL(OUString("CH I"), getProperty<OUString>(xPara, "ListLabelString")); + xPara = getParagraph(2); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: Sect 1.01 + // - Actual : Sect I.01 + // i.e. fLegal was ignored on import/export. + CPPUNIT_ASSERT_EQUAL(OUString("Sect 1.01"), getProperty<OUString>(xPara, "ListLabelString")); + xPara = getParagraph(3); + CPPUNIT_ASSERT_EQUAL(OUString("CH II"), getProperty<OUString>(xPara, "ListLabelString")); + xPara = getParagraph(4); + CPPUNIT_ASSERT_EQUAL(OUString("Sect 2.01"), getProperty<OUString>(xPara, "ListLabelString")); + }; + + createSwDoc("listWithLgl.doc"); + verify(); + saveAndReload(mpFilter); + verify(); +} + DECLARE_WW8EXPORT_TEST(testNonInlinePageBreakFirstLine, "nonInlinePageBreakFirstLine.doc") { SwDoc* pDoc = getSwDoc(); diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx index 950136e66e..669fd6dea4 100644 --- a/sw/qa/inc/swmodeltestbase.hxx +++ b/sw/qa/inc/swmodeltestbase.hxx @@ -273,13 +273,6 @@ protected: int getShapes() const; /** - * Returns an xml stream of an exported file. - * To be used when the exporter doesn't create zip archives, but single files - * (like Flat ODF Export) - */ - xmlDocUniquePtr parseExportedFile(); - - /** * Creates a new document to be used with the internal sw/ API. * * Examples: diff --git a/sw/qa/uitest/data/tdf150443.docx b/sw/qa/uitest/data/tdf150443.docx Binary files differindex 162aec01f9..f1897c4712 100644 --- a/sw/qa/uitest/data/tdf150443.docx +++ b/sw/qa/uitest/data/tdf150443.docx diff --git a/sw/qa/uitest/writer_tests7/tdf150443.py b/sw/qa/uitest/writer_tests7/tdf150443.py index fb39bd8a03..91937551a4 100644 --- a/sw/qa/uitest/writer_tests7/tdf150443.py +++ b/sw/qa/uitest/writer_tests7/tdf150443.py @@ -26,7 +26,9 @@ class tdf150443(UITestCase): xsearch = xDialog.getChild("search") xsearch.executeAction("CLICK", tuple()) #first search xToolkit.processEventsToIdle() - self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "4") + page = get_state_as_dict(xWriterEdit)["CurrentPage"] + # page may depend on font subsitution, just check it moved + self.assertTrue(page == "4" or page == "5") # reject the tracked table row in Manage Changes dialog window with self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges", close_button="close") as xTrackDlg: diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx index d5248bd414..730ece0596 100644 --- a/sw/qa/unit/swmodeltestbase.cxx +++ b/sw/qa/unit/swmodeltestbase.cxx @@ -517,12 +517,6 @@ int SwModelTestBase::getShapes() const return xDraws->getCount(); } -xmlDocUniquePtr SwModelTestBase::parseExportedFile() -{ - auto stream(SvFileStream(maTempFile.GetURL(), StreamMode::READ | StreamMode::TEMPORARY)); - return parseXmlStream(&stream); -} - void SwModelTestBase::createSwDoc(const char* pName, const char* pPassword) { if (!pName) |