Kaydet (Commit) 724ddb91 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:useuniqueptr

Change-Id: I33aafc7351c5fdc2c677d0be123f666211255ccb
üst 169467cc
......@@ -17,8 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <memory>
#include "ChartTransferable.hxx"
#include <o3tl/make_unique.hxx>
#include <sot/exchange.hxx>
#include <sot/storage.hxx>
#include <unotools/streamwrap.hxx>
......@@ -43,7 +48,7 @@ ChartTransferable::ChartTransferable( SdrModel* pDrawModel, SdrObject* pSelected
:m_pMarkedObjModel( nullptr )
,m_bDrawing( bDrawing )
{
SdrExchangeView * pExchgView( new SdrView( pDrawModel ));
std::unique_ptr<SdrExchangeView> pExchgView(o3tl::make_unique<SdrView>( pDrawModel ));
SdrPageView* pPv = pExchgView->ShowSdrPage( pDrawModel->GetPage( 0 ));
if( pSelectedObj )
pExchgView->MarkObj( pSelectedObj, pPv );
......@@ -55,7 +60,6 @@ ChartTransferable::ChartTransferable( SdrModel* pDrawModel, SdrObject* pSelected
{
m_pMarkedObjModel = pExchgView->GetMarkedObjModel();
}
delete pExchgView;
}
ChartTransferable::~ChartTransferable()
......
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