sw/qa/extras/ww8import/data/tdf134902.docx |binary sw/qa/extras/ww8import/ww8import.cxx | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+)
New commits: commit 3e8183e0c4b4c116cbd9187bfdfa7dfdf447805e Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Wed Aug 7 12:56:05 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Tue Sep 10 01:01:27 2024 +0200 tdf#134902 Test added Import test added as follow-up to 0d512cb88757ced10a825a3d544e41696a54341a to check that the imported shape is not visible. Change-Id: I9671930a5613021be20c75e021213dfda5e763cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171587 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/sw/qa/extras/ww8import/data/tdf134902.docx b/sw/qa/extras/ww8import/data/tdf134902.docx new file mode 100644 index 000000000000..fc89611f65cd Binary files /dev/null and b/sw/qa/extras/ww8import/data/tdf134902.docx differ diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index ec920162b9ca..11f8633a77c9 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -312,6 +312,28 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127048) CPPUNIT_ASSERT_EQUAL(false, pShell->GetMacroCallsSeenWhileLoading()); } +CPPUNIT_TEST_FIXTURE(Test, testTdf134902) +{ + createSwDoc("tdf134902.docx"); + CPPUNIT_ASSERT_EQUAL(4, getShapes()); + uno::Reference<drawing::XShape> xShape; + uno::Reference< beans::XPropertySet > XPropSet; + for (int i = 3; i<= getShapes(); i++) + { + xShape = getShape(i); + XPropSet.set( xShape, uno::UNO_QUERY_THROW ); + try + { + bool isVisible = true; + XPropSet->getPropertyValue(u"Visible"_ustr) >>= isVisible; + CPPUNIT_ASSERT(!isVisible); + } + catch (beans::UnknownPropertyException &) + { /* ignore */ } + } + +} + // tests should only be added to ww8IMPORT *if* they fail round-tripping in ww8EXPORT } // end of anonymous namespace