diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-11 17:38:40 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-05-11 21:20:19 +0200 |
commit | 6aba29576df7a2a40e54040d4dd09d94d6594741 (patch) | |
tree | 3247fce06ae3cd762da910a63daf50369850b6cf /sw/qa | |
parent | 9905eb90b3bfe9e7281642b7915db177c5143ff0 (diff) |
tdf#107773 DOC import: consider page breaks for multi-page floattables
See commit 8fe8bd6c3b5b1a539b7370f8c457fa69c061d2de (Related: fdo#61594
SwWW8ImplReader::StartApo: don't always start a frame, 2013-05-13) for
the context, this is one more case where having a multi-page floattable
as a multi-page one is a better option.
The additional condition is that in case there is a break right after
the table, then always import the table as a non-floating one, as there
won't be any wrapping anyway (due to the break).
Change-Id: I3dd4174226cfc1e825c00607221feeed51b7133f
Reviewed-on: https://gerrit.libreoffice.org/37513
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ww8import/data/tdf107773.doc | bin | 0 -> 29184 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8import/ww8import.cxx | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8import/data/tdf107773.doc b/sw/qa/extras/ww8import/data/tdf107773.doc Binary files differnew file mode 100644 index 000000000000..31c7b7c5c121 --- /dev/null +++ b/sw/qa/extras/ww8import/data/tdf107773.doc diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 1a2ec45af6fb..4c2c83499405 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -59,6 +59,14 @@ DECLARE_WW8IMPORT_TEST(testFloatingTableSectionColumns, "floating-table-section- CPPUNIT_ASSERT( tableWidth.toInt32() > 10000 ); } +DECLARE_WW8IMPORT_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()); +} + DECLARE_WW8IMPORT_TEST(testTdf106291, "tdf106291.doc") { // Table cell was merged vertically instead of horizontally -> had incorrect dimensions |