diff options
Diffstat (limited to 'sc/source/ui/unoobj/cellsuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 0e6b0ef4e16a..c5830ce06c56 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -1485,12 +1485,10 @@ ScCellRangesBase::~ScCellRangesBase() void ScCellRangesBase::ForgetCurrentAttrs() { - delete pCurrentFlat; - delete pCurrentDeep; + pCurrentFlat.reset(); + pCurrentDeep.reset(); delete pCurrentDataSet; delete pNoDfltCurrentDataSet; - pCurrentFlat = nullptr; - pCurrentDeep = nullptr; pCurrentDataSet = nullptr; pNoDfltCurrentDataSet = nullptr; @@ -1512,7 +1510,7 @@ const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsFlat() ScDocument& rDoc = pDocShell->GetDocument(); pCurrentFlat = rDoc.CreateSelectionPattern( *GetMarkData(), false ); } - return pCurrentFlat; + return pCurrentFlat.get(); } const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsDeep() @@ -1524,7 +1522,7 @@ const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsDeep() ScDocument& rDoc = pDocShell->GetDocument(); pCurrentDeep = rDoc.CreateSelectionPattern( *GetMarkData() ); } - return pCurrentDeep; + return pCurrentDeep.get(); } SfxItemSet* ScCellRangesBase::GetCurrentDataSet(bool bNoDflt) |