Kaydet (Commit) 7b833ad6 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in IMapWindow

Change-Id: Ibc8d2b6c9b6b463245363cc3e59e79f57a2ce360
Reviewed-on: https://gerrit.libreoffice.org/55232Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 05a1ca8e
......@@ -59,10 +59,9 @@ IMapWindow::IMapWindow( vcl::Window* pParent, WinBits nBits, const Reference< XF
{
SetSdrMode(true);
pItemInfo = new SfxItemInfo[ 1 ];
memset( pItemInfo, 0, sizeof( SfxItemInfo ) );
memset( maItemInfos, 0, sizeof( SfxItemInfo ) );
pIMapPool = new SfxItemPool( "IMapItemPool",
SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, pItemInfo );
SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, maItemInfos );
pIMapPool->FreezeIdRanges();
}
......@@ -74,7 +73,6 @@ IMapWindow::~IMapWindow()
void IMapWindow::dispose()
{
SfxItemPool::Free(pIMapPool);
delete[] pItemInfo;
GraphCtrl::dispose();
}
......
......@@ -28,11 +28,10 @@
#include <svtools/imap.hxx>
#include <sfx2/frame.hxx>
#include <svx/graphctl.hxx>
#include <svl/itempool.hxx>
#include <com/sun/star/frame/XFrame.hpp>
struct SfxItemInfo;
struct NotifyInfo
{
OUString aMarkURL;
......@@ -76,7 +75,7 @@ class IMapWindow final : public GraphCtrl, public DropTargetHelper
TargetList aTargetList;
Link<IMapWindow&,void> aInfoLink;
SfxItemPool* pIMapPool;
SfxItemInfo* pItemInfo;
SfxItemInfo maItemInfos[1];
css::uno::Reference< css::frame::XFrame >
mxDocumentFrame;
......
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