summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/inc/undoblk.hxx4
-rw-r--r--sc/source/ui/undo/undoblk2.cxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index 0c2f5891bc85..7fd2ad69d6ad 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -383,8 +383,8 @@ private:
SCCOLROW nEnd;
SCTAB nStartTab;
SCTAB nEndTab;
- ScDocument* pUndoDoc;
- ScOutlineTable* pUndoTab;
+ std::unique_ptr<ScDocument> pUndoDoc;
+ std::unique_ptr<ScOutlineTable> pUndoTab;
std::vector<sc::ColRowSpan> maRanges;
sal_uInt16 nNewSize;
bool bWidth;
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index 0bde3c5a7f1d..a6fcc01b6881 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -60,8 +60,8 @@ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell,
ScUndoWidthOrHeight::~ScUndoWidthOrHeight()
{
- delete pUndoDoc;
- delete pUndoTab;
+ pUndoDoc.reset();
+ pUndoTab.reset();
DeleteSdrUndoAction( pDrawUndo );
}
@@ -95,7 +95,7 @@ void ScUndoWidthOrHeight::Undo()
//! outlines from all tables?
if (pUndoTab) // Outlines are included when saving ?
- rDoc.SetOutlineTable( nStartTab, pUndoTab );
+ rDoc.SetOutlineTable( nStartTab, pUndoTab.get() );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
SCTAB nTabCount = rDoc.GetTableCount();