diff options
author | Serge Krot <Serge.Krot@cib.de> | 2020-01-15 20:18:15 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-01-17 16:24:36 +0100 |
commit | ee4223bf079b1225e57a51772f6693f69c0e83bd (patch) | |
tree | 9bcc88c6dd97fd669cb3c11dd1fc50e231f38504 | |
parent | d48b128c50c8332193e23f2430bc5134ff51de53 (diff) |
tdf#126795 docx export and TabsRelativeToIndent: added unit test
Change-Id: I233a40133392757978b27666853a1fcef2e00a07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86878
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent0.odt | bin | 0 -> 16401 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent1.odt | bin | 0 -> 16424 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 16 |
3 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent0.odt b/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent0.odt Binary files differnew file mode 100644 index 000000000000..e650076a096a --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent0.odt diff --git a/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent1.odt b/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent1.odt Binary files differnew file mode 100644 index 000000000000..da2eae76bb14 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf126795_TabsRelativeToIndent1.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index aa57c48f19e1..9cb1474c5603 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -97,6 +97,22 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121665_back2backColumnBreaks, "tdf121665_back2ba style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType")); } +DECLARE_OOXMLEXPORT_TEST(testTdf126795_TabsRelativeToIndent0, "tdf126795_TabsRelativeToIndent0.odt") +{ + uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( 2 ), "ParaTabStops"); + CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength()); + CPPUNIT_ASSERT_EQUAL( css::style::TabAlign_LEFT, stops[ 0 ].Alignment ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(499), stops[ 0 ].Position ); +} + +DECLARE_OOXMLEXPORT_TEST(testTdf126795_TabsRelativeToIndent1, "tdf126795_TabsRelativeToIndent1.odt") +{ + uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( 2 ), "ParaTabStops"); + CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength()); + CPPUNIT_ASSERT_EQUAL( css::style::TabAlign_LEFT, stops[ 0 ].Alignment ); + CPPUNIT_ASSERT_EQUAL( sal_Int32(499), stops[ 0 ].Position ); +} + DECLARE_OOXMLEXPORT_TEST(testTdf46938_clearTabStop, "tdf46938_clearTabStop.docx") { // Number of tabstops should be zero, overriding the one in the style |