Kaydet (Commit) beb45beb authored tarafından Michael Stahl's avatar Michael Stahl

sw: fix massive temp dir leak in SwModelTestBase

Change-Id: I92455612c41564e74570b4ee4fa4e3cdfa20f24d
üst cb4cb0c0
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <rtl/byteseq.hxx> #include <rtl/byteseq.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <unotools/tempfile.hxx> #include <unotools/tempfile.hxx>
#include <unotools/localfilehelper.hxx>
#include <unotools/mediadescriptor.hxx> #include <unotools/mediadescriptor.hxx>
#include <dbmgr.hxx> #include <dbmgr.hxx>
#include <unoprnms.hxx> #include <unoprnms.hxx>
...@@ -193,7 +194,6 @@ protected: ...@@ -193,7 +194,6 @@ protected:
sal_uInt32 mnStartTime; sal_uInt32 mnStartTime;
utl::TempFile maTempFile; utl::TempFile maTempFile;
utl::TempFile maTempDir;
bool mbExported; ///< Does maTempFile already contain something useful? bool mbExported; ///< Does maTempFile already contain something useful?
sal_Int16 nCurOutputType; sal_Int16 nCurOutputType;
...@@ -215,7 +215,6 @@ public: ...@@ -215,7 +215,6 @@ public:
, mpTestDocumentPath(pTestDocumentPath) , mpTestDocumentPath(pTestDocumentPath)
, mpFilter(pFilter) , mpFilter(pFilter)
, mnStartTime(0) , mnStartTime(0)
, maTempDir(NULL, true)
, mbExported(false) , mbExported(false)
, nCurOutputType(0) , nCurOutputType(0)
{ {
...@@ -326,7 +325,8 @@ protected: ...@@ -326,7 +325,8 @@ protected:
load(mpTestDocumentPath, filename); load(mpTestDocumentPath, filename);
const OUString aPrefix( "LOMM_" ); const OUString aPrefix( "LOMM_" );
const OUString aWorkDir = maTempDir.GetURL(); utl::TempFile aTempDir(nullptr, true);
const OUString aWorkDir = aTempDir.GetURL();
const OUString aURI( getURLFromSrc(mpTestDocumentPath) + OUString::createFromAscii(datasource) ); const OUString aURI( getURLFromSrc(mpTestDocumentPath) + OUString::createFromAscii(datasource) );
OUString aDBName = registerDBsource( aURI, aPrefix, aWorkDir ); OUString aDBName = registerDBsource( aURI, aPrefix, aWorkDir );
initMailMergeJobAndArgs( filename, tablename, aDBName, aPrefix, aWorkDir ); initMailMergeJobAndArgs( filename, tablename, aDBName, aPrefix, aWorkDir );
...@@ -334,6 +334,8 @@ protected: ...@@ -334,6 +334,8 @@ protected:
postTest(filename); postTest(filename);
verify(); verify();
finish(); finish();
::utl::removeTree(aWorkDir);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment