summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-08-29 14:17:09 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-08-29 15:06:17 +0200
commit17e904ed66c3caf87e658b9d3a18d7b13f4a0b52 (patch)
treef67a31fa134def29a117ee59103540a37251c1bf /sw/qa/extras
parent5cff947699658e5606903bd2aa97f1bd531ef6f8 (diff)
bnc#816593 DOCX filter: import paragraph spacing from table style
Change-Id: I9dce59ecd8a2d2bfadb8c7273cd46c6c0cf17774
Diffstat (limited to 'sw/qa/extras')
-rwxr-xr-xsw/qa/extras/ooxmlimport/data/table-style-parprop.docxbin0 -> 10098 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/table-style-parprop.docx b/sw/qa/extras/ooxmlimport/data/table-style-parprop.docx
new file mode 100755
index 000000000000..1c68c704e7fb
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/table-style-parprop.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 3c13f052a879..64c0764d66d9 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -128,6 +128,7 @@ public:
void testGroupshapeRotation();
void testBnc780044Spacing();
void testTableAutoNested();
+ void testTableStyleParprop();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -222,6 +223,7 @@ void Test::run()
{"groupshape-rotation.docx", &Test::testGroupshapeRotation},
{"bnc780044_spacing.docx", &Test::testBnc780044Spacing},
{"table-auto-nested.docx", &Test::testTableAutoNested},
+ {"table-style-parprop.docx", &Test::testTableStyleParprop},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1508,6 +1510,15 @@ void Test::testTableAutoNested()
CPPUNIT_ASSERT_EQUAL(sal_Int32(23051), getProperty<sal_Int32>(xTables->getByIndex(1), "Width"));
}
+void Test::testTableStyleParprop()
+{
+ // The problem was that w:spacing's w:after=0 (a paragraph property) wasn't imported from table style.
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ // This was 353, the document default, i.e. paragraph property from table style had no effect.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();