summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r--sc/source/ui/undo/undobase.cxx6
-rw-r--r--sc/source/ui/undo/undoblk2.cxx2
-rw-r--r--sc/source/ui/undo/undoblk3.cxx2
-rw-r--r--sc/source/ui/undo/undodat.cxx2
-rw-r--r--sc/source/ui/undo/undoolk.cxx2
-rw-r--r--sc/source/ui/undo/undotab.cxx10
6 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index d88d29d71b53..abaaa8a88ae7 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -245,7 +245,7 @@ ScBlockUndo::ScBlockUndo( ScDocShell* pDocSh, const ScRange& rRange,
aBlockRange( rRange ),
eMode( eBlockMode )
{
- pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
+ pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ).release();
}
ScBlockUndo::~ScBlockUndo()
@@ -346,7 +346,7 @@ ScMultiBlockUndo::ScMultiBlockUndo(
ScSimpleUndo(pDocSh),
maBlockRanges(rRanges)
{
- mpDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
+ mpDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ).release();
}
ScMultiBlockUndo::~ScMultiBlockUndo()
@@ -416,7 +416,7 @@ ScMoveUndo::ScMoveUndo( ScDocShell* pDocSh, ScDocument* pRefDoc, ScRefUndoData*
ScDocument& rDoc = pDocShell->GetDocument();
if (pRefUndoData)
pRefUndoData->DeleteUnchanged(&rDoc);
- pDrawUndo = GetSdrUndoAction( &rDoc );
+ pDrawUndo = GetSdrUndoAction( &rDoc ).release();
}
ScMoveUndo::~ScMoveUndo()
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index d8baab68c6af..3b1c99a7d66e 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -54,7 +54,7 @@ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell,
eMode( eNewMode ),
pDrawUndo( nullptr )
{
- pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
+ pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ).release();
}
ScUndoWidthOrHeight::~ScUndoWidthOrHeight()
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 8e6dd0f50358..99973bd4d7e7 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -75,7 +75,7 @@ ScUndoDeleteContents::ScUndoDeleteContents(
bMulti ( bNewMulti ) // unnecessary
{
if (bObjects)
- pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
+ pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ).release();
if ( !(aMarkData.IsMarked() || aMarkData.IsMultiMarked()) ) // if no cell is selected:
aMarkData.SetMarkArea( aRange ); // select cell under cursor
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index afaed1811b1e..f7ee7e4779b7 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -721,7 +721,7 @@ ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQuery
aAdvSource = *pAdvSrc;
}
- pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
+ pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ).release();
}
ScUndoQuery::~ScUndoQuery()
diff --git a/sc/source/ui/undo/undoolk.cxx b/sc/source/ui/undo/undoolk.cxx
index 060aac26c00b..6a8632fad499 100644
--- a/sc/source/ui/undo/undoolk.cxx
+++ b/sc/source/ui/undo/undoolk.cxx
@@ -23,7 +23,7 @@
#include <drwlayer.hxx>
#include <undoolk.hxx>
-SdrUndoAction* GetSdrUndoAction( ScDocument* pDoc )
+std::unique_ptr<SdrUndoAction> GetSdrUndoAction( ScDocument* pDoc )
{
ScDrawLayer* pLayer = pDoc->GetDrawLayer();
if (pLayer)
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 290457ce4f87..d99555e6a277 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -67,7 +67,7 @@ ScUndoInsertTab::ScUndoInsertTab( ScDocShell* pNewDocShell,
nTab( nTabNum ),
bAppend( bApp )
{
- pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
+ pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ).release();
SetChangeTrack();
}
@@ -159,7 +159,7 @@ ScUndoInsertTables::ScUndoInsertTables( ScDocShell* pNewDocShell,
aNameList( newNameList ),
nTab( nTabNum )
{
- pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
+ pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ).release();
SetChangeTrack();
}
@@ -573,7 +573,7 @@ ScUndoCopyTab::ScUndoCopyTab(
mpNewNames(pNewNames),
pDrawUndo( nullptr )
{
- pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
+ pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ).release();
if (mpNewNames && mpNewTabs->size() != mpNewNames->size())
// The sizes differ. Something is wrong.
@@ -784,7 +784,7 @@ ScUndoMakeScenario::ScUndoMakeScenario( ScDocShell* pNewDocShell,
nFlags( nF ),
pDrawUndo( nullptr )
{
- pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
+ pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ).release();
}
ScUndoMakeScenario::~ScUndoMakeScenario()
@@ -863,7 +863,7 @@ ScUndoImportTab::ScUndoImportTab(ScDocShell* pShell,
, nCount(nNewCount)
, pDrawUndo(nullptr)
{
- pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
+ pDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ).release();
}
ScUndoImportTab::~ScUndoImportTab()