diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-24 09:41:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-24 13:47:52 +0200 |
commit | 604bc943655b88994faa7f307d1c48e914965e95 (patch) | |
tree | 51d09183f93c02371f764a5d1e68c7c54abcb0b5 /sd | |
parent | a43187d9075c6347412a2584d764145127779df8 (diff) |
loplugin:unusedfields readonly fields
Change-Id: I6629926df06f71ff86e9fb23ae4fc1ae73bc9406
Reviewed-on: https://gerrit.libreoffice.org/40360
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviewsc.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx index 5bbf7ff27c49..ca06c593e8ff 100644 --- a/sd/source/ui/view/drviewsc.cxx +++ b/sd/source/ui/view/drviewsc.cxx @@ -49,6 +49,8 @@ #include "DrawDocShell.hxx" #include "drawview.hxx" #include "sdabstdlg.hxx" +#include <memory> + namespace sd { void DrawViewShell::UpdateIMapDlg( SdrObject* pObj ) @@ -58,7 +60,7 @@ void DrawViewShell::UpdateIMapDlg( SdrObject* pObj ) { Graphic aGraphic; ImageMap* pIMap = nullptr; - TargetList* pTargetList = nullptr; + std::unique_ptr<TargetList> pTargetList; SdIMapInfo* pIMapInfo = SdDrawDocument::GetIMapInfo( pObj ); // get graphic from shape @@ -69,14 +71,11 @@ void DrawViewShell::UpdateIMapDlg( SdrObject* pObj ) if ( pIMapInfo ) { pIMap = const_cast<ImageMap*>(&pIMapInfo->GetImageMap()); - pTargetList = new TargetList; - GetViewFrame()->GetTargetList( *pTargetList ); + pTargetList.reset(new TargetList); + SfxViewFrame::GetTargetList( *pTargetList ); } - SvxIMapDlgChildWindow::UpdateIMapDlg( aGraphic, pIMap, pTargetList, pObj ); - - // We can delete the target list - delete pTargetList; + SvxIMapDlgChildWindow::UpdateIMapDlg( aGraphic, pIMap, pTargetList.get(), pObj ); } } |