summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fxedit
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-20 15:12:39 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-20 15:12:39 -0700
commita4fbc2814c231da29104bb8922811127a59bd6e7 (patch)
tree69148339dca41f00cccd8c0c39958a4a07b95da4 /fpdfsdk/include/fxedit
parent19ae17578f99621100a26dac3e2c7c3dbf7c7cd1 (diff)
downloadpdfium-a4fbc2814c231da29104bb8922811127a59bd6e7.tar.xz
Remove Release() from IFX_Edit_UndoItem.
Also delete unused CFFL_Edit_UndoItem class. BUG=https://code.google.com/p/pdfium/issues/detail?id=140 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1098043002
Diffstat (limited to 'fpdfsdk/include/fxedit')
-rw-r--r--fpdfsdk/include/fxedit/fx_edit.h6
-rw-r--r--fpdfsdk/include/fxedit/fxet_edit.h17
2 files changed, 8 insertions, 15 deletions
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index a842fd6284..bf00995ea9 100644
--- a/fpdfsdk/include/fxedit/fx_edit.h
+++ b/fpdfsdk/include/fxedit/fx_edit.h
@@ -164,13 +164,11 @@ public:
class IFX_Edit_UndoItem
{
public:
- virtual void Release() = 0;
+ virtual ~IFX_Edit_UndoItem() { }
+
virtual void Undo() = 0;
virtual void Redo() = 0;
virtual CFX_WideString GetUndoTitle() = 0;
-
-protected:
- ~IFX_Edit_UndoItem() { }
};
class FXET_CLASS IFX_Edit
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h
index 8aa44a4bed..9e5c40f5ff 100644
--- a/fpdfsdk/include/fxedit/fxet_edit.h
+++ b/fpdfsdk/include/fxedit/fxet_edit.h
@@ -325,12 +325,9 @@ class CFX_Edit_UndoItem : public IFX_Edit_UndoItem
{
public:
CFX_Edit_UndoItem() : m_bFirst(TRUE), m_bLast(TRUE) {}
- virtual ~CFX_Edit_UndoItem(){}
- virtual CFX_WideString GetUndoTitle() {return L"";}
- virtual void Release(){delete this;}
+ CFX_WideString GetUndoTitle() override { return L""; }
-public:
void SetFirst(FX_BOOL bFirst){m_bFirst = bFirst;}
FX_BOOL IsFirst(){return m_bFirst;}
void SetLast(FX_BOOL bLast){m_bLast = bLast;}
@@ -345,17 +342,15 @@ class CFX_Edit_GroupUndoItem : public IFX_Edit_UndoItem
{
public:
CFX_Edit_GroupUndoItem(const CFX_WideString& sTitle);
- virtual ~CFX_Edit_GroupUndoItem();
+ ~CFX_Edit_GroupUndoItem() override;
+
+ void Undo() override;
+ void Redo() override;
+ CFX_WideString GetUndoTitle() override;
void AddUndoItem(CFX_Edit_UndoItem* pUndoItem);
void UpdateItems();
-public:
- virtual void Undo();
- virtual void Redo();
- virtual CFX_WideString GetUndoTitle();
- virtual void Release();
-
private:
CFX_WideString m_sTitle;
CFX_ArrayTemplate<CFX_Edit_UndoItem*> m_Items;