summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-02-28 16:55:23 +0100
committerLászló Németh <nemeth@numbertext.org>2020-02-29 17:39:26 +0100
commit294babdbbe0a10c732cd5247c5636638c97a4c30 (patch)
treef2ec7471bad9f592609c0f3f5d1241e309fefdd8 /sw/qa
parent7ce29004934ae7b75dce492bde5602358eb3dc5f (diff)
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 <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf92472.docxbin0 -> 27734 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx21
2 files changed, 21 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf92472.docx
Binary files 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