summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-09-21 11:32:52 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-09-21 11:32:52 +0200
commita0b108ac29e9645c1b2b548d69397cdb71b5a79e (patch)
tree77e094fc1a4f9414820d5156aa07fc2c90ea837d /sw/qa/extras
parent157d7440e873428e276b523351cac22cda890d14 (diff)
Added unit test for 53b7f7df0617bcbd7bbef9a34ef53e5097eb16dc
Change-Id: Ifb3216115e6d4ad8e3b40ab798ed438b7e502f47
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlimport/data/n779627.docxbin0 -> 30152 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx18
2 files changed, 18 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n779627.docx b/sw/qa/extras/ooxmlimport/data/n779627.docx
new file mode 100644
index 000000000000..0993208fce98
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/n779627.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 05d7102a1a02..621650205101 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -90,6 +90,7 @@ public:
void testN778828();
void testInk();
void testN779834();
+ void testN779627();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -126,6 +127,7 @@ public:
CPPUNIT_TEST(testN778828);
CPPUNIT_TEST(testInk);
CPPUNIT_TEST(testN779834);
+ CPPUNIT_TEST(testN779627);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -867,6 +869,22 @@ void Test::testN779834()
load("n779834.docx");
}
+void Test::testN779627()
+{
+ /*
+ * The problem was that the table left position was based on the tableCellMar left value
+ * even for nested tables, while it shouldn't.
+ */
+ load("n779627.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("LeftMargin");
+ sal_Int32 nLeftMargin;
+ aValue >>= nLeftMargin;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nLeftMargin);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();