summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com>2012-09-26 15:25:39 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-10-02 10:13:08 +0200
commite33a9181c76309d31f2ace01b924e404906da28c (patch)
treebc20cb43f0cfbfccb89ceb73a509dc6802fbbfcc /sw
parentb966a09c2da9441961c93c44be556399575db849 (diff)
docx import: set table above/bottom spacing to 0
Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I3e0397dd3d5d14f1e584ac7bc3d22d4638393b06
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/n779941.docxbin0 -> 10316 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx25
2 files changed, 25 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n779941.docx b/sw/qa/extras/ooxmlimport/data/n779941.docx
new file mode 100644
index 000000000000..9889d81e2383
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/n779941.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index c545a898df45..1267eac0c742 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -92,6 +92,7 @@ public:
void testInk();
void testN779834();
void testN779627();
+ void testN779941();
void testFdo55187();
void testN780563();
void testN780853();
@@ -136,6 +137,7 @@ public:
CPPUNIT_TEST(testInk);
CPPUNIT_TEST(testN779834);
CPPUNIT_TEST(testN779627);
+ CPPUNIT_TEST(testN779941);
CPPUNIT_TEST(testFdo55187);
CPPUNIT_TEST(testN780563);
CPPUNIT_TEST(testN780853);
@@ -1006,6 +1008,29 @@ void Test::testN782345()
CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
}
+void Test::testN779941()
+{
+ /*
+ * Make sure top/bottom margins of tables are set to 0 (problem was: bottom margin set to 0.35cm)
+ */
+ load("n779941.docx");
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTableProperties(xTables->getByIndex(0), uno::UNO_QUERY);
+ {
+ uno::Any aValue = xTableProperties->getPropertyValue("TopMargin");
+ sal_Int32 nTopMargin;
+ aValue >>= nTopMargin;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nTopMargin);
+ }
+ {
+ uno::Any aValue = xTableProperties->getPropertyValue("BottomMargin");
+ sal_Int32 nBottomMargin;
+ aValue >>= nBottomMargin;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nBottomMargin);
+ }
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();