sw/qa/extras/ooxmlexport/data/tdf112287.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 11 +++++++++++ writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-)
New commits: commit f5636817e7677a3081263df9004940a7d5ac54af Author: Tibor Nagy <[email protected]> AuthorDate: Wed May 6 11:15:35 2020 +0200 Commit: László Németh <[email protected]> CommitDate: Tue May 12 11:12:23 2020 +0200 tdf#112287 DOCX frame import: fix default vAnchor Vertical frame alignment was calculated from above margin instead of the bottom one, resulting bad positions, when vAnchor wasn't defined. Co-author: Attila Bakos (NISZ) Change-Id: I81bcf53ec826d5dcc9790c661d784b507d9ababc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93556 Tested-by: László Németh <[email protected]> Reviewed-by: László Németh <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/data/tdf112287.docx b/sw/qa/extras/ooxmlexport/data/tdf112287.docx new file mode 100644 index 000000000000..3464e28985da Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf112287.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index a8e4f3d5fc5b..2fc2a246f855 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -1255,6 +1255,17 @@ DECLARE_OOXMLEXPORT_TEST(testSpacingGroupShapeText, "tdf131775_SpacingGroupShape "/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr/w:spacing", "val", "71"); } +DECLARE_OOXMLEXPORT_TEST(testTdf112287, "tdf112287.docx") +{ + // tdf#131775: Check if correct spaceing. + + xmlDocPtr pXmlDocument = parseExport("word/document.xml"); + if (!pXmlDocument) + return; + + assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:framePr","vAnchor","margin"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 9ff009f0d4d1..05adcea8b9ba 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1171,7 +1171,7 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( ) aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_RELATION), sal_Int16( rAppendContext.pLastParagraphProperties->GetvAnchor() >= 0 ? rAppendContext.pLastParagraphProperties->GetvAnchor() : - pStyleProperties->GetvAnchor() >= 0 ? pStyleProperties->GetvAnchor() : text::RelOrientation::FRAME ))); + pStyleProperties->GetvAnchor() >= 0 ? pStyleProperties->GetvAnchor() : text::RelOrientation::PAGE_PRINT_AREA ))); aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_SURROUND), rAppendContext.pLastParagraphProperties->GetWrap() != text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
