diff options
-rw-r--r-- | oox/source/shape/WpsContext.cxx | 5 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf80526_word_wrap.docx | bin | 0 -> 15114 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 10 |
3 files changed, 15 insertions, 0 deletions
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index 076fd1124307..cb47692d4c95 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -160,6 +160,11 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken xTextBoxPropertySet->setPropertyValue("CharColor", xCharColor); } } + + auto nWrappingType = rAttribs.getToken(XML_wrap, XML_square); + xPropertySet->setPropertyValue("TextWordWrap", + uno::makeAny(nWrappingType == XML_square)); + return this; } break; diff --git a/sw/qa/extras/ooxmlexport/data/tdf80526_word_wrap.docx b/sw/qa/extras/ooxmlexport/data/tdf80526_word_wrap.docx Binary files differnew file mode 100644 index 000000000000..abf5ee5ed2c8 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf80526_word_wrap.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx index 682343c782af..f1934775b1c1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx @@ -1086,6 +1086,16 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131420, "tdf131420.docx") assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:pPr/w:pBdr[2]"); } +DECLARE_OOXMLEXPORT_TEST(testTdf80526_word_wrap, "tdf80526_word_wrap.docx") +{ + // tdf#80526: check whether the "wrap" property has been set + // TODO: fix export too + if (mbExported) + return; + uno::Reference<drawing::XShape> xShape = getShape(1); + CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xShape, "TextWordWrap")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |