sd/qa/unit/data/pptx/NumberedList-12ab-ab-34.pptx |binary
 sd/qa/unit/layout-tests.cxx                       |   34 ++++++++++++++++++++++
 2 files changed, 34 insertions(+)

New commits:
commit d6b33766f044fbd8a85a5b19407867d4a10bd90e
Author:     Dr. David Alan Gilbert <[email protected]>
AuthorDate: Thu Oct 16 15:27:53 2025 +0100
Commit:     David Gilbert <[email protected]>
CommitDate: Thu Oct 30 16:01:34 2025 +0100

    tdf#168406: sd/qa: Add numbered list content check
    
    Add a basic numbered list content check using a pptx import.
    The file partially overlaps with tdf#168406 problem, but I've
    not yet managed to find a way to create something quite as weird
    as the original.
    
    In sd/qa/unit/layout-tests because it's got most of the XML wrangling 
locally.
    
    The test file was created using MS Onedrive/365 (free version).
    
    Change-Id: Iee566c961ec5e01a7e2640eaf30839a0114fdcd2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192517
    Reviewed-by: David Gilbert <[email protected]>
    Tested-by: Jenkins

diff --git a/sd/qa/unit/data/pptx/NumberedList-12ab-ab-34.pptx 
b/sd/qa/unit/data/pptx/NumberedList-12ab-ab-34.pptx
new file mode 100644
index 000000000000..ffb93c7f9593
Binary files /dev/null and b/sd/qa/unit/data/pptx/NumberedList-12ab-ab-34.pptx 
differ
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx
index 9a593b611da0..317a2d8c0e3f 100644
--- a/sd/qa/unit/layout-tests.cxx
+++ b/sd/qa/unit/layout-tests.cxx
@@ -271,6 +271,40 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, 
tdf143258_testTbRlLayout)
     }
 }
 
+// A test that tests some parts of numbered list behaviour
+// it's really the numbering we're interested in here
+CPPUNIT_TEST_FIXTURE(SdLayoutTest, numberedList)
+{
+    const OUString sText[] = {
+        "Click to add Title",
+        "1.",
+        "Outer, one",
+        "2.",
+        "Outer, two",
+        "a.",
+        "Second level, a",
+        "b.",
+        "Second level, b",
+        "Blank second level",
+        "a.",
+        "Second level restart, a",
+        "b.",
+        "Second level restart, b",
+        "3.",
+        "Outer, three",
+        "4.",
+        "Outer, four",
+    };
+
+    xmlDocUniquePtr pXmlDoc = load("pptx/NumberedList-12ab-ab-34.pptx");
+    const OString sXPathBase = "/metafile/push[1]/push[1]/textarray["_ostr;
+
+    for (size_t i = 0; i < std::size(sText); i++)
+    {
+        assertXPathContent(pXmlDoc, sXPathBase + OString::number(i + 1) + 
"]/text", sText[i]);
+    }
+}
+
 CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf146731)
 {
     xmlDocUniquePtr pXmlDoc = load("pptx/tdf146731.pptx");

Reply via email to