summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-12-01 13:46:49 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-12-01 15:28:46 +0100
commitb3291a3c0e64fd759184c29848d4323e1384965e (patch)
tree6e8d6ace75ed9cdc3973a15b6cbe4a1a8d668606
parent2b1d0d7b3d8df805abefdb4b4a80f8f17d6924cc (diff)
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 <xiscofauli@libreoffice.org>
-rw-r--r--sd/qa/unit/import-tests2.cxx2
-rw-r--r--sd/qa/unit/sdmodeltestbase.hxx11
2 files changed, 12 insertions, 1 deletions
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)