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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Fri May 28 12:40:46 UTC 2021


 sw/qa/extras/ooxmlexport/data/tdf125268.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx  |   10 ++++++++++
 2 files changed, 10 insertions(+)

New commits:
commit b184d39e212a4af6fcec723cfec58af61da121e0
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri May 28 12:26:56 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri May 28 14:40:03 2021 +0200

    tdf#125268: sw_ooxmlexport15: Add unittest
    
    Change-Id: Ide709668ce88345ff01c2945f28ceca164faf17d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116325
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf125268.odt b/sw/qa/extras/ooxmlexport/data/tdf125268.odt
new file mode 100644
index 000000000000..ebdc20619130
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf125268.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index bacfd0d84fd8..f97f1837a0c5 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -789,6 +789,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf138345_charStyleHighlight, "tdf138345_charStyleH
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_TRANSPARENT), getProperty<sal_Int32>(xRun,"CharBackColor"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf125268, "tdf125268.odt")
+{
+    const uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1), 1, "Hello"), uno::UNO_QUERY);
+    // Without the fix in place, this test would have failed with
+    // - Expected: -1
+    // - Actual  : 0
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_TRANSPARENT), getProperty<sal_Int32>(xRun,"CharHighlight"));
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_BLACK), getProperty<sal_Int32>(xRun,"CharBackColor"));
+}
+
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138345_numberingHighlight, "tdf138345_numberingHighlight.docx")
 {
     // Before the fix, the highlight was completely lost.


More information about the Libreoffice-commits mailing list