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 025ff5782fa199932871a8ec18491bbb11751bda Author: László Németh <nem...@numbertext.org> AuthorDate: Fri Feb 28 16:55:23 2020 +0100 Commit: Gabor Kelemen <kelemen.gab...@nisz.hu> CommitDate: Thu Jun 11 17:11:28 2020 +0200 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> (cherry picked from commit 294babdbbe0a10c732cd5247c5636638c97a4c30) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96141 Tested-by: Gabor Kelemen <kelemen.gab...@nisz.hu> Reviewed-by: Gabor Kelemen <kelemen.gab...@nisz.hu> 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 7c64edb83f74..6561bbeb6cb8 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -160,6 +160,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 f2234f38b37f..b3357d97fb45 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4622,8 +4622,8 @@ void DomainMapper_Impl::CloseFieldCommand() OUString const sFirstParam(std::get<1>(field).empty() ? OUString() : std::get<1>(field).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