summaryrefslogtreecommitdiff
path: root/sd/qa/unit/sdmodeltestbase.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-01-11 11:02:01 +0100
committerMichael Stahl <mstahl@redhat.com>2016-01-11 11:22:25 +0100
commit7dbdd410daeb6f51127da511990e98e77c62cd83 (patch)
tree39e15424c3200e11f8b3bed2c78dea3fd3f64900 /sd/qa/unit/sdmodeltestbase.hxx
parent00d1c2800c10d542673ab6f5a5baa26aa1cbb20e (diff)
sd: enhance the OLE object test to also test the exported XML
Needs adding various helpers to be able to use XPath. Change-Id: Ifa7b1e5434fb253430da2bfcc5d38ea347d437af
Diffstat (limited to 'sd/qa/unit/sdmodeltestbase.hxx')
-rw-r--r--sd/qa/unit/sdmodeltestbase.hxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index a9682bbeb1dc..4c465470c4ef 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -180,21 +180,27 @@ protected:
pShell->DoClose();
}
- sd::DrawDocShellRef saveAndReload(sd::DrawDocShell *pShell, sal_Int32 nExportType)
+ sd::DrawDocShellRef saveAndReload(sd::DrawDocShell *pShell, sal_Int32 nExportType,
+ utl::TempFile * pTempFile = nullptr)
{
FileFormat* pFormat = getFormat(nExportType);
- utl::TempFile aTempFile;
- save(pShell, pFormat, aTempFile);
+ std::unique_ptr<utl::TempFile> pNewTempFile;
+ if (!pTempFile)
+ {
+ pNewTempFile.reset(new utl::TempFile);
+ pTempFile = pNewTempFile.get();
+ }
+ save(pShell, pFormat, *pTempFile);
if(nExportType == ODP)
{
- // BootstrapFixture::validate(aTempFile.GetFileName(), test::ODF);
+ // BootstrapFixture::validate(pTempFile->GetFileName(), test::ODF);
}
else if(nExportType == PPTX)
{
- BootstrapFixture::validate(aTempFile.GetFileName(), test::OOXML);
+ BootstrapFixture::validate(pTempFile->GetFileName(), test::OOXML);
}
- aTempFile.EnableKillingFile();
- return loadURL(aTempFile.GetURL(), nExportType);
+ pTempFile->EnableKillingFile();
+ return loadURL(pTempFile->GetURL(), nExportType);
}
/** Dump shapes in xDocShRef, and compare the dump against content of pShapesDumpFileNameBase<number>.xml.