sw/qa/extras/ooxmlexport/data/tdf92472.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 21 +++++++++++++++++++++ writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-)
New commits: commit 294babdbbe0a10c732cd5247c5636638c97a4c30 Author: László Németh <nem...@numbertext.org> AuthorDate: Fri Feb 28 16:55:23 2020 +0100 Commit: László Németh <nem...@numbertext.org> CommitDate: Sat Feb 29 17:39:26 2020 +0100 tdf#92472 DOCX import: fix checkbox size set by direct formatting at beginning of paragraphs. Follow-up of the commit 22ad4d69d771708f28a2d9e137cfd43ac846cf3a (tdf#121045 DOCX import: fix checkbox size in table). Change-Id: I06f0dfa4376ff8f5730d8cfe1cbc3de022e8aaff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89726 Tested-by: Jenkins Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/sw/qa/extras/ooxmlexport/data/tdf92472.docx b/sw/qa/extras/ooxmlexport/data/tdf92472.docx new file mode 100644 index 000000000000..6cf2b50e9103 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf92472.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index ae8c0a86be45..b607ed2c1522 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -195,6 +195,27 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121045, "tdf121045.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[5]/w:rPr/w:szCs", "val", "20"); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf92472, "tdf92472.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:sz", "val", "20"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:szCs", "val", "20"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:fldChar", "fldCharType", "begin"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:instrText", 1); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:fldChar", "fldCharType", "separate"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[5]/w:fldChar", "fldCharType", "end"); + // form control keeps its direct formatted font size + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr/w:sz", "val", "20"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:rPr/w:szCs", "val", "20"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:rPr/w:sz", "val", "20"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:rPr/w:szCs", "val", "20"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[4]/w:rPr/w:sz", "val", "20"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[4]/w:rPr/w:szCs", "val", "20"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[5]/w:rPr/w:sz", "val", "20"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[5]/w:rPr/w:szCs", "val", "20"); +} + DECLARE_OOXMLEXPORT_TEST(testTdf120315, "tdf120315.docx") { // tdf#120315 cells of the second column weren't vertically merged diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index cae7e40a215d..7e319ab368d6 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4728,8 +4728,8 @@ void DomainMapper_Impl::CloseFieldCommand() (void)vSwitches; OUString const sFirstParam(vArguments.empty() ? OUString() : vArguments.front()); - // apply font size to the form control in tables - if ( m_nTableDepth > 0 && m_pLastCharacterContext.get() && m_pLastCharacterContext->isSet(PROP_CHAR_HEIGHT) ) + // apply font size to the form control + if ( m_pLastCharacterContext.get() && m_pLastCharacterContext->isSet(PROP_CHAR_HEIGHT) ) { uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend; if (xTextAppend.is()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits