sw/qa/extras/ooxmlexport/data/tdf120412_400PercentSubscript.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx                       |    9 
+++++++++
 2 files changed, 9 insertions(+)

New commits:
commit 4b2752755609a4132417e57ca52bfc773c9ef897
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Fri Oct 4 15:48:31 2019 +0300
Commit:     Justin Luth <justin_l...@sil.org>
CommitDate: Wed Nov 6 19:32:40 2019 +0100

    tdf#120412 better unit test
    
    The previous unit test OUGHT to have reported exactly 100% escapement,
    and the patch's purpose was to support greater than 100% escapement.
    Depending on a number of patches (related to bug 99602),
    this unit test verifies that 400% works.
    
    Change-Id: I1ee36d1570c34d86dbfb0a03ee3c2026b9645b63
    Reviewed-on: https://gerrit.libreoffice.org/80220
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_l...@sil.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf120412_400PercentSubscript.docx 
b/sw/qa/extras/ooxmlexport/data/tdf120412_400PercentSubscript.docx
new file mode 100644
index 000000000000..526d7d2c18c4
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf120412_400PercentSubscript.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 17b91ecb9180..b9efb409a456 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -206,6 +206,15 @@ DECLARE_OOXMLEXPORT_TEST(textboxWpgOnly, 
"textbox-wpg-only.docx")
     CPPUNIT_ASSERT_EQUAL(sal_Int32(100), 
getProperty<sal_Int32>(getRun(getParagraphOfText(1, xText), 1), 
"CharEscapementHeight"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf120412_400PercentSubscript, 
"tdf120412_400PercentSubscript.docx")
+{
+    uno::Reference<text::XTextRange> xPara = getParagraph(1);
+    // The word "Base" should not be subscripted.
+    CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1, 
"Base"), "CharEscapement"), 0);
+    // The word "Subscript" should be 12pt, subscripted by 400% (48pt).
+    CPPUNIT_ASSERT_DOUBLES_EQUAL( -400.f, getProperty<float>(getRun(xPara, 2, 
"Subscript"), "CharEscapement"), 0);
+}
+
 DECLARE_OOXMLEXPORT_TEST(testFontEsc, "test_tdf120412.docx")
 {
     xmlDocPtr pXmlDoc =parseExport("word/document.xml");
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to