summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-08-19 13:00:58 +0200
committerLászló Németh <nemeth@numbertext.org>2020-08-20 10:34:18 +0200
commitbf3124cdf61b40c94ba117a76f1b63dabdfd528e (patch)
treed215ab62a6be1efb9872f4ef4835db6840ca018b /sw
parentb39364492c7cbe34923e0d0755db8737b7d6225a (diff)
tdf#135187 DOCX import: fix table style at character formatting
applied also on paragraph level during import. Regression from commit 4d5c0eaf3e0d3d3bcd9e691fffee19b75f3d6631 (tdf#118812 DOCX import: fix table style preference – part 2) See also commit 5ac6f02fdc6015a5d78071570dee310febf95fc6 (tdf#105215 DOCX import: fix paragraph-length direct formatting). Change-Id: I14072c81fc4c54e376a004fa36ba76b56d2beb01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100996 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135187.docxbin0 -> 19696 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135187.docx b/sw/qa/extras/ooxmlexport/data/tdf135187.docx
new file mode 100644
index 000000000000..98a151048f08
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135187.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index bc80088f7a94..a80b76a21223 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -1222,6 +1222,23 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf105215, "tdf105215.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r[5]/w:rPr/w:rFonts", "ascii", "Lohit Devanagari");
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf135187, "tdf135187.docx")
+{
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p/w:pPr/w:rPr/w:b", 0);
+ // FIXME: remove duplicate
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:p/w:pPr/w:rPr/w:b", 2);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:p/w:pPr/w:rPr/w:b", 2);
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b", 1);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b", "val");
+ // This was 0
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b", 1);
+ assertXPathNoAttribute(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b", "val");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b", 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:tc[1]/w:p/w:r[1]/w:rPr/w:b", "val", "false");
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121597TrackedDeletionOfMultipleParagraphs, "tdf121597.odt")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());