diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-02-15 14:06:15 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-02-15 15:05:07 +0100 |
commit | 8fdbda18b593e7014e44a0fd590bbf98d83258b7 (patch) | |
tree | 6f01a202ed9c6b09f0169ec20c7d85f940af143e /sw/qa | |
parent | 3473e1df1fa3483bae68a3c01fdd1b18def99745 (diff) |
sw btlr writing mode: implement DOCX filter
Replace the old trick with character-level rotation with the usage of
the new writing direction.
This means that finally table cells with btlr text direction and
multiple paragraphs show all content, not only the first paragraph, as
before (seen as data loss by users).
Change-Id: I094f36fa6ba0701579e487e8e0212707987b1b2f
Reviewed-on: https://gerrit.libreoffice.org/67870
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx index b42933eb3513..114f0a310570 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx @@ -775,9 +775,8 @@ DECLARE_OOXMLEXPORT_TEST(testTbLrHeight, "tblr-height.docx") 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); - uno::Reference<table::XTableRows> xTableRows(xTable->getRows(), uno::UNO_QUERY); - // btLr text direction was imported as MIN, it should be FIX to avoid incorrectly large height in case of too much content. - CPPUNIT_ASSERT_EQUAL(text::SizeType::FIX, getProperty<sal_Int16>(xTableRows->getByIndex(0), "SizeType")); + uno::Reference<table::XCell> xCell = xTable->getCellByName("B1"); + CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, getProperty<sal_Int16>(xCell, "WritingMode")); } DECLARE_OOXMLEXPORT_TEST(testBnc865381, "bnc865381.docx") @@ -785,11 +784,8 @@ DECLARE_OOXMLEXPORT_TEST(testBnc865381, "bnc865381.docx") 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); - uno::Reference<table::XTableRows> xTableRows(xTextTable->getRows(), uno::UNO_QUERY); - // Second row has a vertically merged cell, make sure size type is not FIX in that case (otherwise B2 is not readable). - CPPUNIT_ASSERT(text::SizeType::FIX != getProperty<sal_Int16>(xTableRows->getByIndex(1), "SizeType")); - // Explicit size of 41 mm100 was set, so the vertical text in A2 was not readable. - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTableRows->getByIndex(1), "Height")); + uno::Reference<table::XCell> xCell = xTextTable->getCellByName("A2"); + CPPUNIT_ASSERT_EQUAL(text::WritingMode2::BT_LR, getProperty<sal_Int16>(xCell, "WritingMode")); } DECLARE_OOXMLEXPORT_TEST(testFdo53985, "fdo53985.docx") |