[Libreoffice-commits] core.git: sw/qa

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Mon May 18 17:24:48 UTC 2020


 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit c50315c55dbb5daf86ccb2a91468c05a53e926e9
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Mon May 18 12:21:04 2020 +0300
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Mon May 18 19:24:10 2020 +0200

    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 at sil.org>

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")


More information about the Libreoffice-commits mailing list