diff options
author | Aron Budea <aron.budea@collabora.com> | 2021-02-28 22:04:24 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-03-01 15:22:47 +0100 |
commit | 102ddaa04193a3303e4d3d3e2193048aad3dc16a (patch) | |
tree | dc7500569ea2462ebfffd8bc24e79819a2c6376d /sw/qa | |
parent | 1e00c377559d387a5b1111bf63e9684ff441b90b (diff) |
tdf#140137 Don't throw exception when w:gridCol is missing "w" attr
2149e924cbc32c370128c5f87a4f55c50c99e6bd added a division-by-zero
check, which caused Writer to throw an error on the bugdoc.
Since the file could be loaded fine before, let's return to a
working version, with the check included.
The cause is the following in document.xml
(originating from a non-MS generator):
<w:tblGrid>
<w:gridCol/>
<w:gridCol/>
</w:tblGrid>
Word still splits such tables differently, but that difference
was always there in Writer.
Change-Id: I6d91a736f460394a76f035298a238c41da201cb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111723
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111736
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111741
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf140137.docx | bin | 0 -> 28792 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 5 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf140137.docx b/sw/qa/extras/ooxmlexport/data/tdf140137.docx Binary files differnew file mode 100644 index 000000000000..d03925e75e2c --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf140137.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index 04c4975056e4..1e28459cc0b0 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -81,6 +81,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf138953, "croppedAndRotated.odt") CPPUNIT_ASSERT_EQUAL(sal_Int32(8664), frameRect.Width); } +DECLARE_OOXMLEXPORT_TEST(testTdf140137, "tdf140137.docx") +{ + // Don't throw exception during load +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |