summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-01 09:38:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-01 10:52:47 +0200
commit63b00ec7d8d140853feb7108a788bfc4f0c79db6 (patch)
tree73d3589ae411699ddab6e6e24bf4c8e2a03ebf8f /sc/source/ui/docshell/docsh5.cxx
parent21d14c51c2f07b795ba286430eb96cca0085f627 (diff)
no need to allocate these on the heap
Change-Id: I6eb3853883c724b5cb28bbf4debf6f56a587ff88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116515 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/docshell/docsh5.cxx')
-rw-r--r--sc/source/ui/docshell/docsh5.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index fad7e64c1698..08ac3b5f0fe0 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -987,9 +987,9 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
return true; // nothing to do, but valid
}
- std::unique_ptr<ScProgress> pProgress(new ScProgress(this, ScResId(STR_UNDO_MOVE_TAB),
- m_aDocument.GetCodeCount(), true));
- bool bDone = m_aDocument.MoveTab( nSrcTab, nDestTab, pProgress.get() );
+ std::optional<ScProgress> pProgress(std::in_place, this, ScResId(STR_UNDO_MOVE_TAB),
+ m_aDocument.GetCodeCount(), true);
+ bool bDone = m_aDocument.MoveTab( nSrcTab, nDestTab, &*pProgress );
pProgress.reset();
if (!bDone)
{