clean up some temp files after running tests

Change-Id: Ia28e96cf1f6ec476f202e99877fa80e93d691278
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105314
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
This commit is contained in:
Andras Timar
2020-11-04 22:08:24 +01:00
parent d3abe0a1fb
commit 33ee9829fe
5 changed files with 5 additions and 0 deletions

View File

@@ -88,6 +88,7 @@ void OoxDrawingmlTest::loadAndReload(const OUString& rURL, const OUString& rFilt
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= rFilterName;
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
mxComponent->dispose();
validate(aTempFile.GetFileName(), test::OOXML);

View File

@@ -113,6 +113,7 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testNoThumbnail)
uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xStorable.is());
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
uno::Sequence<beans::PropertyValue> aProperties(
comphelper::InitPropertySequence({ { "NoThumbnail", uno::makeAny(true) } }));
osl::File::remove(aTempFile.GetURL());

View File

@@ -780,6 +780,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf136176)
// Save and reload
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("draw8");
xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());

View File

@@ -1072,6 +1072,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PDF)
= loadFromDesktop(maTempFile.GetURL(), "com.sun.star.text.TextDocument", aLoadProperties);
xStorable.set(mxComponent, uno::UNO_QUERY);
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
aStoreProperties = {
comphelper::makePropertyValue("FilterName", OUString("writer8")),
};

View File

@@ -56,6 +56,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testTextBoxLoss)
getComponent() = loadFromDesktop(aURL);
uno::Reference<frame::XStorable> xStorable(getComponent(), uno::UNO_QUERY);
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer8");
xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());