Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: fpdfsdk/include/fxedit/fxet_edit.h

Issue 1098043002: Remove Release() from IFX_Edit_UndoItem. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Unused CFFL_Edit_UndoItem Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef _FXET_EDIT_H_ 7 #ifndef _FXET_EDIT_H_
8 #define _FXET_EDIT_H_ 8 #define _FXET_EDIT_H_
9 9
10 #include "../../../core/include/fpdfdoc/fpdf_vt.h" 10 #include "../../../core/include/fpdfdoc/fpdf_vt.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 FX_INT32 m_nBufSize; 318 FX_INT32 m_nBufSize;
319 FX_BOOL m_bModified; 319 FX_BOOL m_bModified;
320 FX_BOOL m_bVirgin; 320 FX_BOOL m_bVirgin;
321 FX_BOOL m_bWorking; 321 FX_BOOL m_bWorking;
322 }; 322 };
323 323
324 class CFX_Edit_UndoItem : public IFX_Edit_UndoItem 324 class CFX_Edit_UndoItem : public IFX_Edit_UndoItem
325 { 325 {
326 public: 326 public:
327 CFX_Edit_UndoItem() : m_bFirst(TRUE), m_bLast(TRUE) {} 327 CFX_Edit_UndoItem() : m_bFirst(TRUE), m_bLast(TRUE) {}
328 virtual ~CFX_Edit_UndoItem(){}
329 328
330 » virtual CFX_WideString» » » » » GetUndoTitle() { return L"";} 329 » CFX_WideString GetUndoTitle() override { return L""; }
331 » virtual void» » » » » » » Release( ){delete this;}
332 330
333 public:
334 void SetFirst(FX_BOOL bFirst){m_bFirst = bFirst;} 331 void SetFirst(FX_BOOL bFirst){m_bFirst = bFirst;}
335 FX_BOOL IsFirst(){return m_bFirst;} 332 FX_BOOL IsFirst(){return m_bFirst;}
336 void SetLast(FX_BOOL bLast){m_bLast = bLast;} 333 void SetLast(FX_BOOL bLast){m_bLast = bLast;}
337 FX_BOOL IsLast(){return m_bLast;} 334 FX_BOOL IsLast(){return m_bLast;}
338 335
339 private: 336 private:
340 FX_BOOL m_bFirst; 337 FX_BOOL m_bFirst;
341 FX_BOOL m_bLast; 338 FX_BOOL m_bLast;
342 }; 339 };
343 340
344 class CFX_Edit_GroupUndoItem : public IFX_Edit_UndoItem 341 class CFX_Edit_GroupUndoItem : public IFX_Edit_UndoItem
345 { 342 {
346 public: 343 public:
347 CFX_Edit_GroupUndoItem(const CFX_WideString& sTitle); 344 CFX_Edit_GroupUndoItem(const CFX_WideString& sTitle);
348 » virtual ~CFX_Edit_GroupUndoItem(); 345 » ~CFX_Edit_GroupUndoItem() override;
346
347 » void» » » » » » » Undo() override;
348 » void» » » » » » » Redo() override;
349 » CFX_WideString» » » » » GetUndoTitle() override;
349 350
350 void AddUndoItem(CFX_Edit_UndoItem* pUndoItem); 351 void AddUndoItem(CFX_Edit_UndoItem* pUndoItem);
351 void UpdateItems(); 352 void UpdateItems();
352 353
353 public:
354 virtual void Undo();
355 virtual void Redo();
356 virtual CFX_WideString GetUndoTitle();
357 virtual void Release( );
358
359 private: 354 private:
360 CFX_WideString m_sTitle ; 355 CFX_WideString m_sTitle ;
361 CFX_ArrayTemplate<CFX_Edit_UndoItem*> m_Items; 356 CFX_ArrayTemplate<CFX_Edit_UndoItem*> m_Items;
362 }; 357 };
363 358
364 /* ------------------------- CFX_Edit_UndoItem derived classes ----------------- ----------- */ 359 /* ------------------------- CFX_Edit_UndoItem derived classes ----------------- ----------- */
365 360
366 class CFXEU_InsertWord : public CFX_Edit_UndoItem 361 class CFXEU_InsertWord : public CFX_Edit_UndoItem
367 { 362 {
368 public: 363 public:
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 FX_INT32 GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex); 809 FX_INT32 GetWordFontIndex(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex);
815 FX_INT32 GetDefaultFontIndex(); 810 FX_INT32 GetDefaultFontIndex();
816 FX_BOOL IsLatinWord(FX_WORD word ); 811 FX_BOOL IsLatinWord(FX_WORD word );
817 812
818 private: 813 private:
819 IFX_Edit_FontMap* m_pFontMap; 814 IFX_Edit_FontMap* m_pFontMap;
820 }; 815 };
821 816
822 #endif //_FXET_EDIT_H_ 817 #endif //_FXET_EDIT_H_
823 818
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698