summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-05-18 12:21:04 +0300
committerJustin Luth <justin_luth@sil.org>2020-05-18 19:24:10 +0200
commitc50315c55dbb5daf86ccb2a91468c05a53e926e9 (patch)
treea9d258b99d8828535ef3eb8c328b3ce48c6bdb99
parent74597acc9318177a0266535b5387dba35305171a (diff)
tdf#95495 ooxmlexport3: less implementation-specific unit test
Although the original document completely defines the numbering in (inherited) paragraph styles, the unit test was checking whether the paragaph itself had the exported numbering. That tests the current implementation where style information is copied to the paragrah, but in a correct world that information would stay in the styles. This unit test uses the EXTREME example where a "chapter numbering" is inherited by a sub-style - something LO completely does not support, so this needs serious emulation. Thus I am keeping the implementation-specific check, but clearly documenting that fact. Change-Id: I5b95646498c4d936eceb9be1841c654a5bd81275 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94401 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 48b2cef55586..2876bb47929a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -1085,7 +1085,13 @@ DECLARE_OOXMLEXPORT_TEST(testNumberingLevels, "tdf95495.docx")
return;
// tdf#95495: set list level of the custom style based on the setting of the parent style
+ // [this assertXPath is not a very good test, since the numbering definition is not set on the paragraph itself,
+ // but in a style. This just tests the current copy-to-paragraph implementation. But leaving it for now,
+ // since this example is very much a corner case, so anyone trespassing here should double-check everything...]
assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:numPr/w:ilvl [@w:val = '1']", 1);
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//body/txt[5]/LineBreak", "Line", "A.2.1 .DESCRIPTION");
}
DECLARE_OOXMLEXPORT_TEST(testVerticalBorders, "calendar3.docx")