diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-11-03 15:01:43 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-11-03 23:21:17 +0100 |
commit | ee1154d7fe84d507ce977b851c4044cafe0b9da9 (patch) | |
tree | b44495ad677e06b10ec73d28421e488d60fb9e73 /sw/qa/unit | |
parent | b7d53247eb2fab04f5f6d82d405f1ac0c73542b2 (diff) |
swmodeltestbase: use maTempFile everywhere
Change-Id: Ifd840984e4144599f2527702a57688863854b7ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142235
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/unit')
-rw-r--r-- | sw/qa/unit/swmodeltestbase.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx index ab5ed2fcbe52..b12f640fb34f 100644 --- a/sw/qa/unit/swmodeltestbase.cxx +++ b/sw/qa/unit/swmodeltestbase.cxx @@ -139,7 +139,7 @@ void SwModelTestBase::executeImportExport(const char* filename, const char* pPas header(); std::unique_ptr<Resetter> const pChanges(preTest(filename)); load(mpTestDocumentPath, filename, pPassword); - save(OUString::createFromAscii(mpFilter), maTempFile); + save(OUString::createFromAscii(mpFilter)); maTempFile.EnableKillingFile(false); verify(); finish(); @@ -626,26 +626,25 @@ void SwModelTestBase::reload(const char* pFilter, const char* filename, const ch calcLayout(); } -void SwModelTestBase::save(const OUString& aFilterName, utl::TempFileNamed& rTempFile) +void SwModelTestBase::save(const OUString& aFilterName) { - rTempFile.EnableKillingFile(); uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; aMediaDescriptor["FilterName"] <<= aFilterName; if (!maFilterOptions.isEmpty()) aMediaDescriptor["FilterOptions"] <<= maFilterOptions; - xStorable->storeToURL(rTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); + xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); // TODO: for now, validate only ODF here if (aFilterName == "writer8" || aFilterName == "OpenDocument Text Flat XML") { - validate(rTempFile.GetFileName(), test::ODF); + validate(maTempFile.GetFileName(), test::ODF); } } void SwModelTestBase::loadAndSave(const char* pName) { load(mpTestDocumentPath, pName); - save(OUString::createFromAscii(mpFilter), maTempFile); + save(OUString::createFromAscii(mpFilter)); mbExported = true; } |