diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-28 18:11:23 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-28 18:11:23 +0100 |
commit | c1e1757cdab6e61b94244761227b0a1f112e6b0c (patch) | |
tree | 8703023eb62da88ae80abb348ba34eb376f74ec5 /sw/qa | |
parent | b2d3f9b5a12928127b476b10599069efea0ddcde (diff) |
DOCX import: ignore <w:tblpPr> in shape text
Floating tables are kind of anchored objects, which are not supported in
shape text by Word, so we should ignore their flotation on import as
well.
Note that there is no need for a setIsInShape(false) in
PopShapeContext() as we pop the whole table manager from the stack
anyway.
Change-Id: Ie9e88d2c83c0c34a01922e6e89f69f6089585b4b
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tblppr-shape.docx | bin | 0 -> 13497 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tblppr-shape.docx b/sw/qa/extras/ooxmlexport/data/tblppr-shape.docx Binary files differnew file mode 100644 index 000000000000..470bce4247de --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tblppr-shape.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index 26f521b0873c..7d4f988426ec 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -713,6 +713,14 @@ DECLARE_OOXMLEXPORT_TEST(testHeaderBorder, "header-border.docx") } } +DECLARE_OOXMLEXPORT_TEST(testTblpprShape, "tblppr-shape.docx") +{ + // Unhandled exception due to unexpected w:tblpPr resulted in not importing page size, either. + uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY); + // This was 2000, page width wasn't large enough. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2540), getProperty<sal_Int32>(xPageStyle, "LeftMargin")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |