diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-04-27 09:50:29 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-04-27 11:48:49 +0200 |
commit | e678e013a9b8d928353f1136b77469950bdd2cdc (patch) | |
tree | b7f43b315c286edefb2063d3035c46eb72a31165 /sd | |
parent | 42eeddb2e634f70418b2aaba7ba9fb479a58ac0e (diff) |
sd_export_tests-ooxml2: don't use try/catch in this test
In general, try/catch shouldn't be used in unittests
Follow-up of 9564747d2fd5d2c859a359dd7fa6242c6859c0d7
"tdf#53970 PPTX: fix import of linked media files"
Change-Id: Ibde31d033b0225ab47522eff01e156cbb2751f18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133468
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 56ff8b067763..dd3dbd286803 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -1832,16 +1832,10 @@ void SdOOXMLExportTest2::testTdf53970() CPPUNIT_ASSERT(xShape.is()); OUString sVideoURL; - // Without fix in place, the media shape was imported as an image after export. - try - { - CPPUNIT_ASSERT_MESSAGE("MediaURL property is not set", - xShape->getPropertyValue("MediaURL") >>= sVideoURL); - } - catch (const beans::UnknownPropertyException&) - { - CPPUNIT_FAIL("Error: MediaURL is unknown property"); - } + // Without fix in place, the media shape was imported as an image after export + // and this test would have failed with exception of type com.sun.star.beans.UnknownPropertyException + CPPUNIT_ASSERT_MESSAGE("MediaURL property is not set", + xShape->getPropertyValue("MediaURL") >>= sVideoURL); CPPUNIT_ASSERT_MESSAGE("MediaURL is empty", !sVideoURL.isEmpty()); xDocShRef->DoClose(); |