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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 22 08:16:36 UTC 2019


 sw/qa/extras/rtfexport/data/tabs.rtf  |    4 ++++
 sw/qa/extras/rtfexport/rtfexport3.cxx |    9 +++++++++
 2 files changed, 13 insertions(+)

New commits:
commit adc7efcd6508308cffd6b5d5932ed97c52edcb1a
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jan 21 21:22:40 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Jan 22 09:16:13 2019 +0100

    RTF filter: add TQDEC testcase
    
    lcov points out this was uncovered previously.
    
    Change-Id: I8f83e811a0f1144dd7ba6a695b4856cdeb7350cf
    Reviewed-on: https://gerrit.libreoffice.org/66703
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/qa/extras/rtfexport/data/tabs.rtf b/sw/qa/extras/rtfexport/data/tabs.rtf
new file mode 100644
index 000000000000..ddae982492d3
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tabs.rtf
@@ -0,0 +1,4 @@
+{\rtf1
+\pard\plain \tqdec\tx1701
+A\tab B\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 9faa2f83c392..6f7dec91570a 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -244,6 +244,15 @@ DECLARE_RTFEXPORT_TEST(testTdf122455, "tdf122455.rtf")
     CPPUNIT_ASSERT_EQUAL(16.0, getProperty<double>(getRun(getParagraph(1), 1), "CharHeight"));
 }
 
+DECLARE_RTFEXPORT_TEST(testTabs, "tabs.rtf")
+{
+    // Test tab alignment in decimal mode.
+    auto aTabStops = getProperty<uno::Sequence<style::TabStop>>(getParagraph(1), "ParaTabStops");
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), aTabStops.getLength());
+    const style::TabStop& rTabStop = aTabStops[0];
+    CPPUNIT_ASSERT_EQUAL(style::TabAlign_DECIMAL, rTabStop.Alignment);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list