sd/qa/unit/import-tests2.cxx | 2 +- sd/qa/unit/sdmodeltestbase.hxx | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
New commits: commit b3291a3c0e64fd759184c29848d4323e1384965e Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Dec 1 13:46:49 2022 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Dec 1 15:28:46 2022 +0100 sd: check files are loaded without any warning error Change-Id: I76b4d657ab3c5606b137ab745f789156dfb9af44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143523 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index 46d1966a2e1a..e704f0bcd783 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -229,7 +229,7 @@ public: void SdImportTest2::testTdf152186() { - loadFromURL(u"pptx/tdf152186.pptx"); + createSdImpressDoc("pptx/tdf152186.pptx"); saveAndReload("Impress MS PowerPoint 2007 XML"); bool bHasShadow; diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx index 189bdda09718..08e3a8e7fbc3 100644 --- a/sd/qa/unit/sdmodeltestbase.hxx +++ b/sd/qa/unit/sdmodeltestbase.hxx @@ -56,6 +56,8 @@ public: uno::Reference<lang::XServiceInfo> xServiceInfo(mxComponent, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT( xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument")); + + CPPUNIT_ASSERT(!getSdDocShell()->GetMedium()->GetWarningError()); } void createSdDrawDoc(const char* pName = nullptr, const char* pPassword = nullptr) @@ -67,6 +69,15 @@ public: uno::Reference<lang::XServiceInfo> xServiceInfo(mxComponent, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument")); + + CPPUNIT_ASSERT(!getSdDocShell()->GetMedium()->GetWarningError()); + } + + sd::DrawDocShell* getSdDocShell() + { + SdXImpressDocument* pImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); + CPPUNIT_ASSERT(pImpressDocument); + return pImpressDocument->GetDocShell(); } uno::Reference<drawing::XDrawPage> getPage(int nPage)