summaryrefslogtreecommitdiff
path: root/sc/source/ui/navipi/content.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/navipi/content.cxx')
-rw-r--r--sc/source/ui/navipi/content.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index ad7ea280d8c7..6ab4e597fa15 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -1306,7 +1306,7 @@ static void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, ScDra
void ScContentTree::DoDrag()
{
- ScDocumentLoader* pDocLoader = nullptr;
+ std::unique_ptr<ScDocumentLoader> pDocLoader;
bIsInDrag = true;
ScModule* pScMod = SC_MOD();
@@ -1395,7 +1395,7 @@ void ScContentTree::DoDrag()
{
OUString aFilter, aOptions;
OUString aURL = aHiddenName;
- pDocLoader = new ScDocumentLoader( aURL, aFilter, aOptions );
+ pDocLoader.reset(new ScDocumentLoader( aURL, aFilter, aOptions ));
if (!pDocLoader->IsError())
pSrcShell = pDocLoader->GetDocShell();
}
@@ -1450,8 +1450,6 @@ void ScContentTree::DoDrag()
}
bIsInDrag = false; // static member
-
- delete pDocLoader; // if document was load for dragging
}
IMPL_LINK_NOARG(ScContentTree, ExecDragHdl, void*, void)