summaryrefslogtreecommitdiff
path: root/sw/source/uibase/dochdl
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 /sw/source/uibase/dochdl
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 'sw/source/uibase/dochdl')
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 61abefb4ffaa..a67f021e72d4 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -2688,10 +2688,10 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData,
if (pFmView && pDragPt)
{
const OXFormsDescriptor &rDesc = OXFormsTransferable::extractDescriptor(rData);
- SdrObject* pObj = pFmView->CreateXFormsControl(rDesc);
- if(nullptr != pObj)
+ SdrObjectUniquePtr pObj = pFmView->CreateXFormsControl(rDesc);
+ if(pObj)
{
- rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt );
+ rSh.SwFEShell::InsertDrawObj( *(pObj.release()), *pDragPt );
}
}
}
@@ -2745,9 +2745,9 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData,
FmFormView* pFmView = dynamic_cast<FmFormView*>( rSh.GetDrawView() );
if (pFmView && bHaveColumnDescriptor && pDragPt)
{
- SdrObject* pObj = pFmView->CreateFieldControl( OColumnTransferable::extractColumnDescriptor(rData) );
- if ( nullptr != pObj)
- rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt );
+ SdrObjectUniquePtr pObj = pFmView->CreateFieldControl( OColumnTransferable::extractColumnDescriptor(rData) );
+ if (pObj)
+ rSh.SwFEShell::InsertDrawObj( *(pObj.release()), *pDragPt );
}
}
bRet = true;