summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/undo/undobase.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/undo/undobase.cxx')
-rw-r--r--sc/source/ui/undo/undobase.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 5ac882779ec3..c2b4b693ddfc 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -38,7 +38,6 @@
ScSimpleUndo::ScSimpleUndo( ScDocShell* pDocSh ) :
pDocShell( pDocSh ),
- pDetectiveUndo( nullptr ),
mnViewShellId(-1)
{
if (ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell())
@@ -52,7 +51,6 @@ sal_Int32 ScSimpleUndo::GetViewShellId() const
ScSimpleUndo::~ScSimpleUndo()
{
- delete pDetectiveUndo;
}
bool ScSimpleUndo::SetViewMarkData( const ScMarkData& rMarkData )
@@ -83,8 +81,7 @@ bool ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
// ScUndoDraw is later deleted by the UndoManager
ScUndoDraw* pCalcUndo = static_cast<ScUndoDraw*>(pNextAction);
- pDetectiveUndo = pCalcUndo->GetDrawUndo();
- pCalcUndo->ForgetDrawUndo();
+ pDetectiveUndo.reset( pCalcUndo->ReleaseDrawUndo() );
return true;
}
@@ -610,7 +607,6 @@ ScUndoWrapper::ScUndoWrapper( SfxUndoAction* pUndo ) :
ScUndoWrapper::~ScUndoWrapper()
{
- delete pWrappedUndo;
}
void ScUndoWrapper::ForgetWrappedUndo()