tdf#134902 Test added

Import test added as follow-up to
0d512cb887
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.behrens@allotropia.de>
This commit is contained in:
Oliver Specht
2024-09-10 01:01:27 +02:00
committed by Thorsten Behrens
parent 9c0cd7c60b
commit 3e8183e0c4
2 changed files with 22 additions and 0 deletions
Binary file not shown.
+22
View File
@@ -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