[Libreoffice-commits] core.git: sc/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Jun 29 06:27:37 UTC 2018
sc/source/ui/inc/undoolk.hxx | 1 -
sc/source/ui/undo/undobase.cxx | 7 +++----
sc/source/ui/undo/undoblk2.cxx | 2 +-
sc/source/ui/undo/undoblk3.cxx | 4 ++--
sc/source/ui/undo/undocell.cxx | 4 ++--
sc/source/ui/undo/undodat.cxx | 2 +-
sc/source/ui/undo/undoolk.cxx | 5 -----
sc/source/ui/undo/undotab.cxx | 10 +++++-----
8 files changed, 14 insertions(+), 21 deletions(-)
New commits:
commit 286461d872057ab8110d9713c5cbe859448dda70
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Jun 28 09:38:04 2018 +0200
inline DeleteSdrUndoAction
so that loplugin:useuniqueptr can trigger on it
Change-Id: I04d68278f870ec137b3a78491e83e8adc7374fa4
Reviewed-on: https://gerrit.libreoffice.org/56618
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/ui/inc/undoolk.hxx b/sc/source/ui/inc/undoolk.hxx
index c9c80b23fa7e..a8e03577c86e 100644
--- a/sc/source/ui/inc/undoolk.hxx
+++ b/sc/source/ui/inc/undoolk.hxx
@@ -26,7 +26,6 @@ class ScDocument;
std::unique_ptr<SdrUndoAction> GetSdrUndoAction( ScDocument* pDoc );
void DoSdrUndoAction ( SdrUndoAction* pUndoAction, ScDocument* pDoc );
void RedoSdrUndoAction ( SdrUndoAction* pUndoAction );
-void DeleteSdrUndoAction ( SdrUndoAction* pUndoAction );
void EnableDrawAdjust ( ScDocument* pDoc, bool bEnable );
#endif
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 4a7dbc28a54d..42c8f993040e 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -250,7 +250,7 @@ ScBlockUndo::ScBlockUndo( ScDocShell* pDocSh, const ScRange& rRange,
ScBlockUndo::~ScBlockUndo()
{
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
}
void ScBlockUndo::BeginUndo()
@@ -351,7 +351,7 @@ ScMultiBlockUndo::ScMultiBlockUndo(
ScMultiBlockUndo::~ScMultiBlockUndo()
{
- DeleteSdrUndoAction( mpDrawUndo );
+ delete mpDrawUndo;
}
void ScMultiBlockUndo::BeginUndo()
@@ -423,7 +423,7 @@ ScMoveUndo::~ScMoveUndo()
{
delete pRefUndoData;
delete pRefUndoDoc;
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
}
void ScMoveUndo::UndoRef()
@@ -469,7 +469,6 @@ ScDBFuncUndo::ScDBFuncUndo( ScDocShell* pDocSh, const ScRange& rOriginal ) :
ScDBFuncUndo::~ScDBFuncUndo()
{
- DeleteSdrUndoAction( nullptr );
delete pAutoDBRange;
}
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index a6fcc01b6881..c2a81e7b4b8c 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -62,7 +62,7 @@ ScUndoWidthOrHeight::~ScUndoWidthOrHeight()
{
pUndoDoc.reset();
pUndoTab.reset();
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
}
OUString ScUndoWidthOrHeight::GetComment() const
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 89db1e2fa38c..1ace788eb96a 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -88,7 +88,7 @@ ScUndoDeleteContents::ScUndoDeleteContents(
ScUndoDeleteContents::~ScUndoDeleteContents()
{
pUndoDoc.reset();
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
}
OUString ScUndoDeleteContents::GetComment() const
@@ -648,7 +648,7 @@ ScUndoMerge::ScUndoMerge(ScDocShell* pNewDocShell, const ScCellMergeOption& rOpt
ScUndoMerge::~ScUndoMerge()
{
- DeleteSdrUndoAction( mpDrawUndo );
+ delete mpDrawUndo;
}
OUString ScUndoMerge::GetComment() const
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 04048d8ef96e..51f5b105f040 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -915,7 +915,7 @@ ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rP
ScUndoReplaceNote::~ScUndoReplaceNote()
{
- DeleteSdrUndoAction( mpDrawUndo );
+ delete mpDrawUndo;
}
void ScUndoReplaceNote::Undo()
@@ -1048,7 +1048,7 @@ ScUndoDetective::ScUndoDetective( ScDocShell* pNewDocShell,
ScUndoDetective::~ScUndoDetective()
{
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
delete pOldList;
}
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index ea4cacef499c..11ad1c6daef2 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -727,7 +727,7 @@ ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQuery
ScUndoQuery::~ScUndoQuery()
{
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
}
OUString ScUndoQuery::GetComment() const
diff --git a/sc/source/ui/undo/undoolk.cxx b/sc/source/ui/undo/undoolk.cxx
index 6a8632fad499..ac812fdabc34 100644
--- a/sc/source/ui/undo/undoolk.cxx
+++ b/sc/source/ui/undo/undoolk.cxx
@@ -65,11 +65,6 @@ void RedoSdrUndoAction( SdrUndoAction* pUndoAction )
pUndoAction->Redo();
}
-void DeleteSdrUndoAction( SdrUndoAction* pUndoAction )
-{
- delete pUndoAction;
-}
-
void EnableDrawAdjust( ScDocument* pDoc, bool bEnable )
{
ScDrawLayer* pLayer = pDoc->GetDrawLayer();
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 6862d2794cc8..8746136dc2fc 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -74,7 +74,7 @@ ScUndoInsertTab::ScUndoInsertTab( ScDocShell* pNewDocShell,
ScUndoInsertTab::~ScUndoInsertTab()
{
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
}
OUString ScUndoInsertTab::GetComment() const
@@ -167,7 +167,7 @@ ScUndoInsertTables::ScUndoInsertTables( ScDocShell* pNewDocShell,
ScUndoInsertTables::~ScUndoInsertTables()
{
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
}
OUString ScUndoInsertTables::GetComment() const
@@ -584,7 +584,7 @@ ScUndoCopyTab::ScUndoCopyTab(
ScUndoCopyTab::~ScUndoCopyTab()
{
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
}
OUString ScUndoCopyTab::GetComment() const
@@ -791,7 +791,7 @@ ScUndoMakeScenario::ScUndoMakeScenario( ScDocShell* pNewDocShell,
ScUndoMakeScenario::~ScUndoMakeScenario()
{
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
}
OUString ScUndoMakeScenario::GetComment() const
@@ -870,7 +870,7 @@ ScUndoImportTab::ScUndoImportTab(ScDocShell* pShell,
ScUndoImportTab::~ScUndoImportTab()
{
- DeleteSdrUndoAction( pDrawUndo );
+ delete pDrawUndo;
}
OUString ScUndoImportTab::GetComment() const
More information about the Libreoffice-commits
mailing list