Kaydet (Commit) 2589cb2a authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in OLEObjCache

Change-Id: Ie16963e2b3b9d85d5640f03daa487dbe231af4a1
Reviewed-on: https://gerrit.libreoffice.org/49272Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 2e6bbc04
......@@ -27,6 +27,7 @@
#include <tools/fract.hxx>
#include <vcl/outdev.hxx>
#include <svx/svdobj.hxx>
#include <memory>
/**
......@@ -162,7 +163,7 @@ class OLEObjCache
std::vector<SdrOle2Obj*> maObjs;
size_t nSize;
AutoTimer* pTimer;
std::unique_ptr<AutoTimer> pTimer;
static bool UnloadObj( SdrOle2Obj* pObj );
DECL_LINK( UnloadCheckHdl, Timer*, void );
......
......@@ -108,7 +108,7 @@ OLEObjCache::OLEObjCache()
nSize = officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get();
else
nSize = 100;
pTimer = new AutoTimer( "svx OLEObjCache pTimer UnloadCheck" );
pTimer.reset( new AutoTimer( "svx OLEObjCache pTimer UnloadCheck" ) );
pTimer->SetInvokeHandler( LINK(this, OLEObjCache, UnloadCheckHdl) );
pTimer->SetTimeout(20000);
pTimer->SetStatic();
......@@ -117,7 +117,6 @@ OLEObjCache::OLEObjCache()
OLEObjCache::~OLEObjCache()
{
pTimer->Stop();
delete pTimer;
}
IMPL_LINK_NOARG(OLEObjCache, UnloadCheckHdl, Timer*, void)
......
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