sw/qa/extras/ooxmlexport/data/tdf133924.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 12 +++++++++++- sw/source/filter/ww8/docxattributeoutput.cxx | 11 ++++------- 3 files changed, 15 insertions(+), 8 deletions(-)
New commits: commit e0b9e1bd5f96c377375f4c8bb5a35d169071db43 Author: Tibor Nagy <[email protected]> AuthorDate: Sun Jun 14 16:23:54 2020 +0200 Commit: Gabor Kelemen <[email protected]> CommitDate: Sun Jul 26 22:17:33 2020 +0200 tdf#133924 DOCX export: fix text wraps around frame Co-authored-by: Attila Bakos (NISZ) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96290 Tested-by: László Németh <[email protected]> Reviewed-by: László Németh <[email protected]> (cherry picked from commit 9bbc60c0d5e60eacecd624f343aecc94e4219c84) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96699 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit d4dbf1cc87ae21567acc96a409974f1d159d550f) Change-Id: I08f0c8a8f4f554178548ca5fc8d072998a379b32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99403 Tested-by: Gabor Kelemen <[email protected]> Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/data/tdf133924.docx b/sw/qa/extras/ooxmlexport/data/tdf133924.docx new file mode 100644 index 000000000000..3bdbe8d6f1e0 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf133924.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index 9b96cd04893b..bcc9fed18e1c 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -1019,7 +1019,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf133457, "tdf133457.docx") if (!pXmlDocument) return; - assertXPath(pXmlDocument, "/w:document/w:body/w:p[4]/w:pPr/w:framePr","vAnchor","text"); + assertXPath(pXmlDocument, "/w:document/w:body/w:p[4]/w:pPr/w:framePr", "vAnchor", "text"); +} + +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf133924, "tdf133924.docx") +{ + xmlDocPtr pXmlDocument = parseExport("word/document.xml"); + if (!pXmlDocument) + return; + + assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:framePr", "wrap", "around"); + assertXPath(pXmlDocument, "/w:document/w:body/w:p[3]/w:pPr/w:framePr", "wrap", "notBeside"); } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 9b63aefddc15..0d8534386cf7 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -587,17 +587,14 @@ void DocxAttributeOutput::PopulateFrameProperties(const SwFrameFormat* pFrameFor switch (pFrameFormat->GetSurround().GetValue()) { case css::text::WrapTextMode_NONE: - attrList->add( FSNS( XML_w, XML_wrap), "none"); - break; - case css::text::WrapTextMode_THROUGH: - attrList->add( FSNS( XML_w, XML_wrap), "through"); - break; - case css::text::WrapTextMode_PARALLEL: attrList->add( FSNS( XML_w, XML_wrap), "notBeside"); break; case css::text::WrapTextMode_DYNAMIC: + attrList->add(FSNS(XML_w, XML_wrap), "auto"); + break; + case css::text::WrapTextMode_PARALLEL: default: - attrList->add( FSNS( XML_w, XML_wrap), "auto"); + attrList->add(FSNS(XML_w, XML_wrap), "around"); break; } attrList->add( FSNS( XML_w, XML_vAnchor), relativeFromV ); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
