diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-08 18:00:34 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-08 18:14:55 +0200 |
commit | ab52bb712c335e88cf100b3b8336a46b7673eb98 (patch) | |
tree | 724b951cef11afe5c5059fba7fb0808069ebcf42 /sw/qa | |
parent | d61f8185e660a6820351b8cea3ac51d344f0ab3e (diff) |
DOCX export: fix handling of shapes containing and also anchored inside tables
Change-Id: I6f23bd0e0553b8f6435537b542fc82ee55a64c03
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/textbox-table.docx | bin | 0 -> 16404 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/textbox-table.docx b/sw/qa/extras/ooxmlexport/data/textbox-table.docx Binary files differnew file mode 100644 index 000000000000..8c06f5eeb088 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/textbox-table.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 9b493398767a..279be0030435 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -424,6 +424,17 @@ DECLARE_OOXMLEXPORT_TEST(testMultiPageToc, "multi-page-toc.docx") CPPUNIT_ASSERT_EQUAL(OUString("TextFieldStart"), getProperty<OUString>(getRun(getParagraphOfText(1, xHeaderText), 1), "TextPortionType")); } +DECLARE_OOXMLEXPORT_TEST(testTextboxTable, "textbox-table.docx") +{ + // We wrote not-well-formed XML during export for this one: + // Shape with textbox, having a table and also anchored inside a table. + + // Just make sure that we have both tables. + uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |