summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-15 15:50:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-16 06:09:55 +0000
commit64ea8306b0ceb001132ac9cbc945a12afc01b8cd (patch)
treef77f453a43c8ce388b45b460193d608399ecaa47 /sc/source
parent4f786274be8f9b01b34ad0772bcf718d5259bdc0 (diff)
drop GetId() from SfxUndoAction
mostly so that the subclasses can use proper enum types for their own IDs. It turns out that nothing at the svl/sfx2 level needs an ID anyhow. Change-Id: I3c020aeafb812fa30d896216d4e3bc1a82cbfeab Reviewed-on: https://gerrit.libreoffice.org/35222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/inc/undobase.hxx1
-rw-r--r--sc/source/ui/inc/undoblk.hxx1
-rw-r--r--sc/source/ui/inc/undodraw.hxx1
-rw-r--r--sc/source/ui/undo/undobase.cxx8
-rw-r--r--sc/source/ui/undo/undoblk.cxx5
-rw-r--r--sc/source/ui/undo/undodraw.cxx8
-rw-r--r--sc/source/ui/view/gridwin.cxx3
7 files changed, 2 insertions, 25 deletions
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index 571690f9ad4b..24ef2ee758a5 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -183,7 +183,6 @@ public:
virtual bool Merge( SfxUndoAction *pNextAction ) override;
virtual OUString GetComment() const override;
virtual OUString GetRepeatComment(SfxRepeatTarget&) const override;
- virtual sal_uInt16 GetId() const override;
/// See SfxUndoAction::GetViewShellId().
sal_Int32 GetViewShellId() const override;
};
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index 76e4433d7e80..c558b44227ab 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -671,7 +671,6 @@ public:
virtual bool CanRepeat(SfxRepeatTarget& rTarget) const override;
virtual OUString GetComment() const override;
- virtual sal_uInt16 GetId() const override;
private:
ScMarkData aMarkData;
diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx
index 763fa4f57d4a..43cb7766d918 100644
--- a/sc/source/ui/inc/undodraw.hxx
+++ b/sc/source/ui/inc/undodraw.hxx
@@ -45,7 +45,6 @@ public:
virtual bool Merge( SfxUndoAction *pNextAction ) override;
virtual OUString GetComment() const override;
virtual OUString GetRepeatComment(SfxRepeatTarget&) const override;
- virtual sal_uInt16 GetId() const override;
/// See SfxUndoAction::GetViewShellId().
sal_Int32 GetViewShellId() const override;
};
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 036cdd96761b..b8b0aca430b1 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -642,14 +642,6 @@ OUString ScUndoWrapper::GetRepeatComment(SfxRepeatTarget& rTarget) const
return OUString();
}
-sal_uInt16 ScUndoWrapper::GetId() const
-{
- if (pWrappedUndo)
- return pWrappedUndo->GetId();
- else
- return 0;
-}
-
bool ScUndoWrapper::Merge( SfxUndoAction* pNextAction )
{
if (pWrappedUndo)
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 8ab8095a52da..c9f626c8a4e7 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1758,11 +1758,6 @@ bool ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const
return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr;
}
-sal_uInt16 ScUndoSelectionStyle::GetId() const
-{
- return STR_UNDO_APPLYCELLSTYLE;
-}
-
ScUndoEnterMatrix::ScUndoEnterMatrix( ScDocShell* pNewDocShell, const ScRange& rArea,
ScDocument* pNewUndoDoc, const OUString& rForm ) :
ScBlockUndo( pNewDocShell, rArea, SC_UNDO_SIMPLE ),
diff --git a/sc/source/ui/undo/undodraw.cxx b/sc/source/ui/undo/undodraw.cxx
index 484dd76f42ce..e779733c2b82 100644
--- a/sc/source/ui/undo/undodraw.cxx
+++ b/sc/source/ui/undo/undodraw.cxx
@@ -56,14 +56,6 @@ OUString ScUndoDraw::GetRepeatComment(SfxRepeatTarget& rTarget) const
return OUString();
}
-sal_uInt16 ScUndoDraw::GetId() const
-{
- if (pDrawUndo)
- return pDrawUndo->GetId();
- else
- return 0;
-}
-
bool ScUndoDraw::Merge( SfxUndoAction* pNextAction )
{
if (pDrawUndo)
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 3640f0b3ed40..bfbae1242a84 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -129,6 +129,7 @@
#include "spellcheckcontext.hxx"
#include "uiobject.hxx"
#include "scabstdlg.hxx"
+#include "undoblk.hxx"
#include <svx/sdrpagewindow.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
@@ -1860,7 +1861,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (nMouseStatus == SC_GM_WATERUNDO) // Undo in format paintbrush mode
{
::svl::IUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager();
- if ( pMgr->GetUndoActionCount() && pMgr->GetUndoActionId() == STR_UNDO_APPLYCELLSTYLE )
+ if ( pMgr->GetUndoActionCount() && dynamic_cast<ScUndoSelectionStyle*>(pMgr->GetUndoAction()) )
pMgr->Undo();
return;
}