summaryrefslogtreecommitdiffstats
path: root/sw/qa
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-07-11 08:18:22 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-07-25 10:18:53 +0200
commit5fa898acb96fb344b526bd6e3892c4f4fae6e4f8 (patch)
treeea2dcec638c975fbeeaab422a3ae0aea78d725df /sw/qa
parentsw,sc: Signature Line: fix VclPtr assertion (diff)
downloadcore-5fa898acb96fb344b526bd6e3892c4f4fae6e4f8.tar.gz
core-5fa898acb96fb344b526bd6e3892c4f4fae6e4f8.zip
tdf#63561 docx export: "clear" unused inherited tabs
If a style contains tab definitions, then the paragraph inherits these. They are added to any tabs defined at the paragraph level. Unwanted inherited tabs must be explicitly removed. (TODO: LO ought to be inheriting from ALL parents, so the same logic ought to apply to a style's parent tabs, but currently LO does not import that way. So the proof unit test looks different in MSO compared to LO.) Change-Id: Ida8ed2792482655d512c753fdff8d02062d895a8 Reviewed-on: https://gerrit.libreoffice.org/57255 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 859a0389b5639397e9c46cd4828a35793bd194f8) Reviewed-on: https://gerrit.libreoffice.org/57267 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs.docxbin0 -> 4499 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx8
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs.docx b/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs.docx
new file mode 100644
index 000000000000..228b9b5478ba
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index af4fa6661907..6249547816df 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -56,6 +56,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf46938_clearTabStop, "tdf46938_clearTabStop.docx"
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty< uno::Sequence<style::TabStop> >(getParagraph(1), "ParaTabStops").getLength());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf63561_clearTabs, "tdf63561_clearTabs.docx")
+{
+ // MSO2013 gives 5,7, and 4 respectively
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< uno::Sequence<style::TabStop> >(getParagraph(1), "ParaTabStops").getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty< uno::Sequence<style::TabStop> >(getParagraph(3), "ParaTabStops").getLength());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), getProperty< uno::Sequence<style::TabStop> >(getParagraph(4), "ParaTabStops").getLength());
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf82065_Ind_start_strict, "tdf82065_Ind_start_strict.docx")
{
uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);