diff options
author | Adam Co <rattles2013@gmail.com> | 2013-06-26 11:08:56 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-06-28 11:43:48 +0200 |
commit | 74c5ed19f430327988194cdcd6bdff09591a93fa (patch) | |
tree | 3c13fe12ac592a1d0acb6caf273f12a1d0e15433 /sw | |
parent | 7f4a622f9fbf27774efa908348e682df7280713b (diff) |
DOCX import fix for table with auto size
Change-Id: Ic86f4f142e579bdef3e954492e1c1e382a545739
Reviewed-on: https://gerrit.libreoffice.org/4496
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/table-auto-column-fixed-size.docx | bin | 0 -> 17672 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/table-auto-column-fixed-size.docx b/sw/qa/extras/ooxmlimport/data/table-auto-column-fixed-size.docx Binary files differnew file mode 100644 index 000000000000..557edcb3cb0b --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/table-auto-column-fixed-size.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 4f23d926686c..985bd66b80cd 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -121,6 +121,7 @@ public: void testN820788(); void testN820504(); void testFdo43641(); + void testTableAutoColumnFixedSize(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -208,6 +209,7 @@ void Test::run() {"n820788.docx", &Test::testN820788}, {"n820504.docx", &Test::testN820504}, {"fdo43641.docx", &Test::testFdo43641}, + {"table-auto-column-fixed-size.docx", &Test::testTableAutoColumnFixedSize}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1462,6 +1464,16 @@ void Test::testFdo43641() CPPUNIT_ASSERT_EQUAL(sal_Int32(EMU_TO_MM100(928694)), xLine->getSize().Width); } +void Test::testTableAutoColumnFixedSize() +{ + uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY); + uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY); + + // Width was not recognized during import when table size was 'auto' + CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(3996)), getProperty<sal_Int32>(xTextTable, "Width")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |