summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-15 13:58:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-20 08:00:58 +0200
commit722cb06e71539e108f663ca1c2dd6baf7f4adc64 (patch)
tree47141f5957aa91d3d53de45e297a07fc84082f6c /sd
parent587bd15487f78dc0e973ea811a4200612ceeda5d (diff)
return by unique_ptr from CreateFieldControl
Change-Id: Ic8bf9829c3320aca452fd1a40e9843fdbdbfa219 Reviewed-on: https://gerrit.libreoffice.org/61906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviewse.cxx4
-rw-r--r--sd/source/ui/view/sdview3.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 91a10f0aa275..05f8b041be60 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -272,7 +272,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
if(pPageView)
{
svx::ODataAccessDescriptor aDescriptor(pDescriptorItem->GetValue());
- SdrObject* pNewDBField = pFormView->CreateFieldControl(aDescriptor);
+ SdrObjectUniquePtr pNewDBField = pFormView->CreateFieldControl(aDescriptor);
if(pNewDBField)
{
@@ -285,7 +285,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
pNewDBField->SetLogicRect(aNewObjectRectangle);
- GetView()->InsertObjectAtView(pNewDBField, *pPageView);
+ GetView()->InsertObjectAtView(pNewDBField.release(), *pPageView);
}
}
}
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 06d66260dd7a..e15e67a860de 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -842,7 +842,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( aDataHelper.GetString( SotClipboardFormatId::SBA_FIELDDATAEXCHANGE, aOUString ) )
{
- SdrObject* pObj = CreateFieldControl( aOUString );
+ SdrObjectUniquePtr pObj = CreateFieldControl( aOUString );
if( pObj )
{
@@ -854,7 +854,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
aRect.SetPos( maDropPos );
pObj->SetLogicRect( aRect );
- InsertObjectAtView( pObj, *GetSdrPageView(), SdrInsertFlags::SETDEFLAYER );
+ InsertObjectAtView( pObj.release(), *GetSdrPageView(), SdrInsertFlags::SETDEFLAYER );
bReturn = true;
}
}