diff options
author | Justin Luth <justin.luth@collabora.com> | 2020-03-26 09:33:08 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2020-03-28 08:50:08 +0100 |
commit | 35b3a3eb001ec8ff8c808ad6d990a583163ad365 (patch) | |
tree | 87a63ad86687ceeec7f596c104145fe72315877a /sw/qa/extras/ww8export/ww8export2.cxx | |
parent | 70adbc53e88e5b99032d63065410716c54b4f96f (diff) |
tdf#80635 ww8import:1 take float table CENTER to inlined table
Since SW has problems with floating tables, any unnecessarily
floated tables are converted to inline. However, the
positioning of the tables is mostly lost. So the choice is
either to refuse to inline a strangely positioned table
or else to transfer the positioning onto the inlined table.
Transferring is easier said than done. But for centered tables,
it is easy to copy that.
Change-Id: I8a6deaa63c45277c30ffa12613c8ed125a45d607
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91188
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras/ww8export/ww8export2.cxx')
-rw-r--r-- | sw/qa/extras/ww8export/ww8export2.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx index 9abcdf7a9eef..b477b03bbeaa 100644 --- a/sw/qa/extras/ww8export/ww8export2.cxx +++ b/sw/qa/extras/ww8export/ww8export2.cxx @@ -252,6 +252,20 @@ DECLARE_WW8EXPORT_TEST(testTdf116570_exportFootnote, "tdf116570_exportFootnote.o CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of paragraphs in first footnote", 2, getParagraphs(xFootnoteText) ); } +DECLARE_WW8EXPORT_TEST(testTdf107773, "tdf107773.doc") +{ + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); + // This was 1, multi-page table was imported as a floating one. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), xDrawPage->getCount()); + + // tdf#80635 - transfer the float orientation to the table. + uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY); + uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Horizontal Orientation", text::HoriOrientation::CENTER, getProperty<sal_Int16>(xTable, "HoriOrient")); +} + DECLARE_WW8EXPORT_TEST(testTdf112074_RTLtableJustification, "tdf112074_RTLtableJustification.doc") { uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); |