diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/inc/ZipOutputStream.hxx | 2 | ||||
-rw-r--r-- | package/qa/cppunit/test_package.cxx | 3 | ||||
-rw-r--r-- | package/source/zipapi/ZipOutputStream.cxx | 4 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 3 |
4 files changed, 7 insertions, 5 deletions
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx index a0a8f3ad24ac..2c3e26fab4ac 100644 --- a/package/inc/ZipOutputStream.hxx +++ b/package/inc/ZipOutputStream.hxx @@ -47,7 +47,7 @@ public: const css::uno::Reference< css::io::XOutputStream > &xOStream ); ~ZipOutputStream(); - void addDeflatingThread( ZipOutputEntry *pEntry, comphelper::ThreadTask *pThreadTask ); + void addDeflatingThread( ZipOutputEntry *pEntry, std::unique_ptr<comphelper::ThreadTask> pThreadTask ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException diff --git a/package/qa/cppunit/test_package.cxx b/package/qa/cppunit/test_package.cxx index 04e6b0643e96..0c49e55dca11 100644 --- a/package/qa/cppunit/test_package.cxx +++ b/package/qa/cppunit/test_package.cxx @@ -13,6 +13,7 @@ #include <comphelper/threadpool.hxx> #include <com/sun/star/packages/zip/ZipFileAccess.hpp> #include <com/sun/star/beans/NamedValue.hpp> +#include <o3tl/make_unique.hxx> #include <iterator> @@ -159,7 +160,7 @@ namespace mxNA->getByName(aName) >>= xStrm; CPPUNIT_ASSERT(xStrm.is()); - aPool.pushTask(new Worker(pTag, xStrm, *itBuf)); + aPool.pushTask(o3tl::make_unique<Worker>(pTag, xStrm, *itBuf)); } aPool.waitUntilDone(pTag); diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx index f7f54d6ff421..94f8d024dd7c 100644 --- a/package/source/zipapi/ZipOutputStream.cxx +++ b/package/source/zipapi/ZipOutputStream.cxx @@ -68,9 +68,9 @@ void ZipOutputStream::setEntry( ZipEntry *pEntry ) } } -void ZipOutputStream::addDeflatingThread( ZipOutputEntry *pEntry, comphelper::ThreadTask *pThread ) +void ZipOutputStream::addDeflatingThread( ZipOutputEntry *pEntry, std::unique_ptr<comphelper::ThreadTask> pThread ) { - comphelper::ThreadPool::getSharedOptimalPool().pushTask(pThread); + comphelper::ThreadPool::getSharedOptimalPool().pushTask(std::move(pThread)); m_aEntries.push_back(pEntry); } diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 908a093cb62d..a558be575127 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -50,6 +50,7 @@ #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> +#include <o3tl/make_unique.hxx> #include <rtl/instance.hxx> #include <rtl/random.h> @@ -835,7 +836,7 @@ bool ZipPackageStream::saveChild( // Start a new thread deflating this zip entry ZipOutputEntry *pZipEntry = new ZipOutputEntry( m_xContext, *pTempEntry, this, bToBeEncrypted); - rZipOut.addDeflatingThread( pZipEntry, new DeflateThread(rZipOut.getThreadTaskTag(), pZipEntry, xStream) ); + rZipOut.addDeflatingThread( pZipEntry, o3tl::make_unique<DeflateThread>(rZipOut.getThreadTaskTag(), pZipEntry, xStream) ); } else { |