OLD | NEW |
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 #include "../../include/fxedit/fxet_stub.h" | 7 #include "../../include/fxedit/fxet_stub.h" |
8 #include "../../include/fxedit/fxet_edit.h" | 8 #include "../../include/fxedit/fxet_edit.h" |
9 | 9 |
10 #define FX_EDIT_UNDO_MAXITEM 10000 | 10 #define FX_EDIT_UNDO_MAXITEM 10000 |
(...skipping 2783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2794 CPVT_WordPlace oldplace = m_pVT->GetPrevWordPlace(place); | 2794 CPVT_WordPlace oldplace = m_pVT->GetPrevWordPlace(place); |
2795 | 2795 |
2796 if (oldplace.SecCmp(place) != 0) { | 2796 if (oldplace.SecCmp(place) != 0) { |
2797 if (pIterator->GetSection(secinfo)) { | 2797 if (pIterator->GetSection(secinfo)) { |
2798 AddEditUndoItem(new CFXEU_ClearRich( | 2798 AddEditUndoItem(new CFXEU_ClearRich( |
2799 this, oldplace, place, range, wordinfo.Word, | 2799 this, oldplace, place, range, wordinfo.Word, |
2800 wordinfo.nCharset, secinfo.SecProps, secinfo.WordProps)); | 2800 wordinfo.nCharset, secinfo.SecProps, secinfo.WordProps)); |
2801 } | 2801 } |
2802 } else { | 2802 } else { |
2803 if (pIterator->GetWord(wordinfo)) { | 2803 if (pIterator->GetWord(wordinfo)) { |
2804 oldplace = m_pVT->AjustLineHeader(oldplace, TRUE); | 2804 oldplace = m_pVT->AdjustLineHeader(oldplace, TRUE); |
2805 place = m_pVT->AjustLineHeader(place, TRUE); | 2805 place = m_pVT->AdjustLineHeader(place, TRUE); |
2806 | 2806 |
2807 AddEditUndoItem(new CFXEU_ClearRich( | 2807 AddEditUndoItem(new CFXEU_ClearRich( |
2808 this, oldplace, place, range, wordinfo.Word, | 2808 this, oldplace, place, range, wordinfo.Word, |
2809 wordinfo.nCharset, secinfo.SecProps, wordinfo.WordProps)); | 2809 wordinfo.nCharset, secinfo.SecProps, wordinfo.WordProps)); |
2810 } | 2810 } |
2811 } | 2811 } |
2812 } while (pIterator->PrevWord()); | 2812 } while (pIterator->PrevWord()); |
2813 } | 2813 } |
2814 EndGroupUndo(); | 2814 EndGroupUndo(); |
2815 } else { | 2815 } else { |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3124 if (m_bOprNotify && m_pOprNotify) | 3124 if (m_bOprNotify && m_pOprNotify) |
3125 m_pOprNotify->OnAddUndo(pEditUndoItem); | 3125 m_pOprNotify->OnAddUndo(pEditUndoItem); |
3126 } | 3126 } |
3127 } | 3127 } |
3128 | 3128 |
3129 void CFX_Edit::AddUndoItem(IFX_Edit_UndoItem* pUndoItem) { | 3129 void CFX_Edit::AddUndoItem(IFX_Edit_UndoItem* pUndoItem) { |
3130 m_Undo.AddItem(pUndoItem); | 3130 m_Undo.AddItem(pUndoItem); |
3131 if (m_bOprNotify && m_pOprNotify) | 3131 if (m_bOprNotify && m_pOprNotify) |
3132 m_pOprNotify->OnAddUndo(pUndoItem); | 3132 m_pOprNotify->OnAddUndo(pUndoItem); |
3133 } | 3133 } |
OLD | NEW |