sw/qa/extras/ooxmlexport/data/tdf133457.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 9 +++++++++ writerfilter/source/dmapper/DomainMapper_Impl.cxx | 17 ++++++++++++++--- 3 files changed, 23 insertions(+), 3 deletions(-)
New commits: commit 0462bce410def34c953ec974df1bc8305952b2c6 Author: Tibor Nagy <nagy.tib...@nisz.hu> AuthorDate: Thu May 28 13:47:30 2020 +0200 Commit: Gabor Kelemen <kelemen.gab...@nisz.hu> CommitDate: Thu Jul 23 16:49:56 2020 +0200 tdf#133457 DOCX import: fix frame position regression caused by commit f5636817e7677a3081263df9004940a7d5ac54af (tdf#112287 DOCX frame import: fix default vAnchor). Co-authored-by: Attila Bakos (NISZ) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95035 Tested-by: Jenkins Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> (cherry picked from commit 5e8761ef902a8d5d6534b7c1803242bacff72be3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95977 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 067f7548f4e4cebcfcbc38457201d1c112ad80c3) Change-Id: I6fe16ff274d6a2fa4a335c7790ecd0f01641a6fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99295 Tested-by: Gabor Kelemen <kelemen.gab...@nisz.hu> Reviewed-by: Gabor Kelemen <kelemen.gab...@nisz.hu> diff --git a/sw/qa/extras/ooxmlexport/data/tdf133457.docx b/sw/qa/extras/ooxmlexport/data/tdf133457.docx new file mode 100644 index 000000000000..8fb6730b0933 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf133457.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index 2b6b4c58307d..01904b93b365 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -1003,6 +1003,15 @@ DECLARE_OOXMLIMPORT_TEST(testTdf107119, "tdf107119.docx") CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_PARALLEL, getProperty<text::WrapTextMode>(XPropsWrap, "Surround")); } +DECLARE_OOXMLEXPORT_TEST(testTdf133457, "tdf133457.docx") +{ + xmlDocPtr pXmlDocument = parseExport("word/document.xml"); + if (!pXmlDocument) + return; + + assertXPath(pXmlDocument, "/w:document/w:body/w:p[4]/w:pPr/w:framePr","vAnchor","text"); +} + 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 8cdf3e741f27..c882ac586745 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1148,10 +1148,21 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( ) pStyleProperties->IsyValid() ? pStyleProperties->Gety() : DEFAULT_VALUE)); //Default the anchor in case FramePr_vAnchor is missing ECMA 17.3.1.11 - aFrameProperties.push_back(comphelper::makePropertyValue(getPropertyName(PROP_VERT_ORIENT_RELATION), sal_Int16( - rAppendContext.pLastParagraphProperties->GetvAnchor() >= 0 ? + if (rAppendContext.pLastParagraphProperties->GetWrap() == text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE && + pStyleProperties->GetWrap() == text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE) + { + 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))); + } + else + { + 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::PAGE_PRINT_AREA ))); + 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 libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits