sw/qa/extras/ww8export/data/tdf135709.odt |binary sw/qa/extras/ww8export/ww8export4.cxx | 16 ++++++++++++++++ 2 files changed, 16 insertions(+)
New commits: commit b53c654552e2bec837ea996c60ab929e0398640d Author: Adam Seskunas <adamsesku...@gmail.com> AuthorDate: Mon Jul 29 15:56:00 2024 -0700 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Jul 31 13:16:09 2024 +0200 tdf#135709 - Add Unit Test Change-Id: I35b2d894ce1dbffed013983585bc8cc14b93b59f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171222 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins diff --git a/sw/qa/extras/ww8export/data/tdf135709.odt b/sw/qa/extras/ww8export/data/tdf135709.odt new file mode 100644 index 000000000000..eb636be21260 Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf135709.odt differ diff --git a/sw/qa/extras/ww8export/ww8export4.cxx b/sw/qa/extras/ww8export/ww8export4.cxx index 60fa17634441..d72121affb87 100644 --- a/sw/qa/extras/ww8export/ww8export4.cxx +++ b/sw/qa/extras/ww8export/ww8export4.cxx @@ -18,6 +18,7 @@ #include <com/sun/star/text/XTextDocument.hpp> #include <com/sun/star/text/XTextFrame.hpp> #include <com/sun/star/text/XTextTable.hpp> +#include <com/sun/star/text/WrapTextMode.hpp> #include <comphelper/sequenceashashmap.hxx> #include <o3tl/string_view.hxx> @@ -397,6 +398,21 @@ CPPUNIT_TEST_FIXTURE(Test, testEmptyGroup) saveAndReload(mpFilter); } +CPPUNIT_TEST_FIXTURE(Test, testTdf135709) +{ + createSwDoc("tdf135709.odt"); + saveAndReload("MS Word 97"); + + uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xPropertySet(xTextFramesSupplier->getTextFrames()->getByName("Frame1") , uno::UNO_QUERY); + + xPropertySet->setPropertyValue("AnchorType", + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + + text::WrapTextMode eValue; + xPropertySet->getPropertyValue("Surround") >>= eValue; + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrap should be PARALLEL", text::WrapTextMode_PARALLEL, eValue); +} } // end of anonymous namespace CPPUNIT_PLUGIN_IMPLEMENT();