summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh4.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-08 11:22:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-09 12:09:55 +0200
commitf7ce839c7844f029c0a1ac83a5638e83356b4c4b (patch)
treec93a342a577133b384a3ccc088d7d0675d4fb9e3 /sc/source/ui/docshell/docsh4.cxx
parent4ba06560e33f17ca1ed72ad722c80eae5ffd4277 (diff)
use unique_ptr in SfxUndoManager::AddUndoAction
Change-Id: I11483e3cece12a7373f4276972b4c899edf1ce15 Reviewed-on: https://gerrit.libreoffice.org/61566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r--sc/source/ui/docshell/docsh4.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 1fab2b481f6f..b09254aeb764 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -388,7 +388,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (bUndo)
{
GetUndoManager()->AddUndoAction(
- new ScUndoChartData( this, aChartName, aRangeListRef,
+ o3tl::make_unique<ScUndoChartData>( this, aChartName, aRangeListRef,
bColHeaders, bRowHeaders, bAddRange ) );
}
m_aDocument.UpdateChartArea( aChartName, aRangeListRef,
@@ -400,7 +400,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (bUndo)
{
GetUndoManager()->AddUndoAction(
- new ScUndoChartData( this, aChartName, aNewRange,
+ o3tl::make_unique<ScUndoChartData>( this, aChartName, aNewRange,
bColHeaders, bRowHeaders, bAddRange ) );
}
m_aDocument.UpdateChartArea( aChartName, aNewRange,
@@ -1524,7 +1524,7 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages
{
sal_uInt16 nOldScale = rSet.Get(ATTR_PAGE_SCALE).GetValue();
sal_uInt16 nOldPages = rSet.Get(ATTR_PAGE_SCALETOPAGES).GetValue();
- GetUndoManager()->AddUndoAction( new ScUndoPrintZoom(
+ GetUndoManager()->AddUndoAction( o3tl::make_unique<ScUndoPrintZoom>(
this, nTab, nOldScale, nOldPages, nScale, nPages ) );
}
@@ -1726,7 +1726,7 @@ void ScDocShell::ExecutePageStyle( const SfxViewShell& rCaller,
if (bUndo)
{
GetUndoManager()->AddUndoAction(
- new ScUndoModifyStyle( this, SfxStyleFamily::Page,
+ o3tl::make_unique<ScUndoModifyStyle>( this, SfxStyleFamily::Page,
aOldData, aNewData ) );
}