sw/qa/extras/ooxmlexport/data/tdf154369.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport21.cxx   |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit c37acfce0aab520f30714961d333b1cd52eba4e7
Author:     Kira Tubo <kira.t...@gmail.com>
AuthorDate: Mon Apr 22 00:32:14 2024 -0700
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Apr 25 10:01:37 2024 +0200

    tdf#154369: sw unit test: numbered list color in docx
    
    Unit test checks that the color of the ordered list number is the same 
color as paragraph color in the docx file.
    
    Change-Id: I5e620ace079d6cba6d0aa0ba11c97e05a9db55c3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166423
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/sw/qa/extras/ooxmlexport/data/tdf154369.docx 
b/sw/qa/extras/ooxmlexport/data/tdf154369.docx
new file mode 100755
index 000000000000..fefdc9655a18
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf154369.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
index 2683ccad087e..15af73057d75 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
@@ -511,6 +511,27 @@ DECLARE_OOXMLEXPORT_TEST(testTdf126533_pageBitmap, 
"tdf126533_pageBitmap.docx")
                 
"/rels:Relationships/rels:Relationship[@Target='media/image1.jpeg']"_ostr, 1);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf154369, "tdf154369.docx")
+{
+    //Unit test for bug fix in tdf#154369
+    // Docx file contains ordered list formatted with Heading 1 style, font 
color set as Accent 1 from theme
+    xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+    // Without the fix in place, this test would have failed with:
+    // - Expected result: A & B bullets display same green color #527d55 as 
the paragraph
+    // - Actual result: A & B bullets display black color, while the paragraph 
is green color #527d55
+    assertXPath(pXmlDoc, 
"/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr,
+                "expand"_ostr, "A.");
+    assertXPath(pXmlDoc,
+                
"/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr,
+                "color"_ostr, "00527d55");
+    assertXPath(pXmlDoc, 
"/root/page[1]/body/txt[2]/SwParaPortion/SwLineLayout/SwFieldPortion"_ostr,
+                "expand"_ostr, "B.");
+    assertXPath(pXmlDoc,
+                
"/root/page[1]/body/txt[2]/SwParaPortion/SwLineLayout/SwFieldPortion/SwFont"_ostr,
+                "color"_ostr, "00527d55");
+}
+
 } // end of anonymous namespace
 CPPUNIT_PLUGIN_IMPLEMENT();
 

Reply via email to