diff options
author | Aron Budea <aron.budea@collabora.com> | 2019-02-23 02:01:54 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-03-04 12:15:11 +0100 |
commit | 0b9e4f6085d147c43a86d107303eea9b86e7f34c (patch) | |
tree | aa5c01125afcf8bda8ab223c2e98cedd59e416e5 /sw/qa | |
parent | ba676e500f39c398248b906e516843f20ecef30e (diff) |
tdf#119201 Don't show/print hidden shapes in DOCX
Similar fix to b38065ea941375bf4f78f13314e84f4a875545d9
Only rely visibility setting for now, but properly:
visible means also printed, hidden means not printed.
Ie. import visible property also as printable, and only
output visible property in DOCX format (DOC shapes have no
such property).
Change-Id: Ifc3c36f90aa16ded1a9f31197612a5c85fde5d87
Reviewed-on: https://gerrit.libreoffice.org/68239
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf119201.docx | bin | 0 -> 24206 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf119201.docx b/sw/qa/extras/ooxmlexport/data/tdf119201.docx Binary files differnew file mode 100644 index 000000000000..d454d6731bb1 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf119201.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index d52f546790c9..01e13fee05c7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -147,6 +147,20 @@ DECLARE_OOXMLEXPORT_TEST(testFrameSizeExport, "floating-tables-anchor.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tblPr/w:tblW", "w", "4000"); } +DECLARE_OOXMLEXPORT_TEST(testTdf119201, "tdf119201.docx") +{ + // Visibility of shapes wasn't imported/exported, for now base printable property on that, too + auto xShape(getShape(1)); + CPPUNIT_ASSERT_MESSAGE("First shape should be visible.", getProperty<bool>(xShape, "Visible")); + CPPUNIT_ASSERT_MESSAGE("First shape should be printable.", getProperty<bool>(xShape, "Printable")); + xShape = getShape(2); + CPPUNIT_ASSERT_MESSAGE("Second shape should not be visible.", !getProperty<bool>(xShape, "Visible")); + CPPUNIT_ASSERT_MESSAGE("Second shape should not be printable.", !getProperty<bool>(xShape, "Printable")); + xShape = getShape(3); + CPPUNIT_ASSERT_MESSAGE("Third shape should be visible.", getProperty<bool>(xShape, "Visible")); + CPPUNIT_ASSERT_MESSAGE("Third shape should be printable.", getProperty<bool>(xShape, "Printable")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |