From 248be1fe7d31499fe7e237bb15ec67b55962c1a7 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 4 Nov 2022 17:31:55 +0100 Subject: UnoApiTest: simplify code by using tempfile member SwModelTestBase does the same. this will help to make SwModelTestBase inherit from UnoApiTest Change-Id: If1c824cf92f0e8b70253e4d5fdeddcaa521d4632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142287 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- embeddedobj/qa/cppunit/msole.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'embeddedobj') diff --git a/embeddedobj/qa/cppunit/msole.cxx b/embeddedobj/qa/cppunit/msole.cxx index ee76dfb3984c..ef2027d958dc 100644 --- a/embeddedobj/qa/cppunit/msole.cxx +++ b/embeddedobj/qa/cppunit/msole.cxx @@ -94,9 +94,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSaveOnThread) mxComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument", aLoadProperties); // When saving that document on a thread: - utl::TempFileNamed aTempFile; - aTempFile.EnableKillingFile(); - OdtExportThread aThread(mxComponent, aTempFile.GetURL()); + OdtExportThread aThread(mxComponent, maTempFile.GetURL()); aThread.create(); { SolarMutexReleaser r; @@ -108,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSaveOnThread) } // Then make sure its visible area's width is correct. - xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml"); + xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); // 16 pixels, assuming 96 DPI. // Without the accompanying fix in place, this test would have failed with: // - Expected: 0.1665in -- cgit